2
2
/*eslint-disable dot-notation*/
3
3
/*eslint-disable no-shadow*/
4
4
5
- var test = require ( 'tape ' ) ;
5
+ var tap = require ( 'tap ' ) ;
6
6
var path = require ( 'path' ) ;
7
7
var pa = require ( '../core/lib/pattern_assembler' ) ;
8
8
var Pattern = require ( '../core/lib/object_factory' ) . Pattern ;
@@ -11,9 +11,10 @@ var eol = require('os').EOL;
11
11
// don't run these tests unless twig is installed
12
12
var engineLoader = require ( '../core/lib/pattern_engines' ) ;
13
13
if ( ! engineLoader . twig ) {
14
- test . only ( 'Twig engine not installed, skipping tests.' , function ( test ) {
14
+ tap . test ( 'Twig engine not installed, skipping tests.' , function ( test ) {
15
15
test . end ( ) ;
16
16
} ) ;
17
+ return ;
17
18
}
18
19
19
20
// fake pattern lab constructor:
@@ -69,7 +70,7 @@ function testFindPartials(test, partialTests) {
69
70
test . end ( ) ;
70
71
}
71
72
72
- test ( 'button twig pattern renders' , function ( test ) {
73
+ tap . test ( 'button twig pattern renders' , function ( test ) {
73
74
test . plan ( 1 ) ;
74
75
75
76
var patternPath = path . join ( '00-atoms' , '00-general' , '08-button.twig' ) ;
@@ -85,7 +86,7 @@ test('button twig pattern renders', function (test) {
85
86
test . end ( ) ;
86
87
} ) ;
87
88
88
- test ( 'media object twig pattern can see the atoms-button and atoms-image partials and renders them' , function ( test ) {
89
+ tap . test ( 'media object twig pattern can see the atoms-button and atoms-image partials and renders them' , function ( test ) {
89
90
test . plan ( 1 ) ;
90
91
91
92
// pattern paths
@@ -113,7 +114,7 @@ test('media object twig pattern can see the atoms-button and atoms-image partial
113
114
test . end ( ) ;
114
115
} ) ;
115
116
116
- test . skip ( 'twig partials can render JSON values' , function ( test ) {
117
+ tap . test ( 'twig partials can render JSON values' , { skip : true } , function ( test ) {
117
118
test . plan ( 1 ) ;
118
119
119
120
// pattern paths
@@ -137,7 +138,7 @@ test.skip('twig partials can render JSON values', function (test) {
137
138
test . end ( ) ;
138
139
} ) ;
139
140
140
- test . skip ( 'twig partials use the JSON environment from the calling pattern and can accept passed parameters' , function ( test ) {
141
+ tap . test ( 'twig partials use the JSON environment from the calling pattern and can accept passed parameters' , { skip : true } , function ( test ) {
141
142
test . plan ( 1 ) ;
142
143
143
144
// pattern paths
@@ -169,7 +170,7 @@ test.skip('twig partials use the JSON environment from the calling pattern and c
169
170
test . end ( ) ;
170
171
} ) ;
171
172
172
- test ( 'find_pattern_partials finds partials' , function ( test ) {
173
+ tap . test ( 'find_pattern_partials finds partials' , function ( test ) {
173
174
testFindPartials ( test , [
174
175
'{% include "atoms-image" %}' ,
175
176
"{% include 'atoms-image' %}" ,
@@ -180,14 +181,14 @@ test('find_pattern_partials finds partials', function (test) {
180
181
] ) ;
181
182
} ) ;
182
183
183
- test ( 'find_pattern_partials finds verbose partials' , function ( test ) {
184
+ tap . test ( 'find_pattern_partials finds verbose partials' , function ( test ) {
184
185
testFindPartials ( test , [
185
186
"{% include '01-molecules/06-components/03-comment-header.twig' %}" ,
186
187
"{% include '00-atoms/00-global/06-test' %}"
187
188
] ) ;
188
189
} ) ;
189
190
190
- test ( 'find_pattern_partials finds partials with twig parameters' , function ( test ) {
191
+ tap . test ( 'find_pattern_partials finds partials with twig parameters' , function ( test ) {
191
192
testFindPartials ( test , [
192
193
"{% include 'molecules-template' with {'foo': 'bar'} %}" ,
193
194
"{% include 'molecules-template' with vars %}" ,
0 commit comments