1616 specific language governing permissions and limitations
1717 under the License.
1818*/
19+ const { describe, it, beforeEach } = require ( 'node:test' ) ;
20+ const assert = require ( 'node:assert' ) ;
1921
20- var fullProject = require ( './fixtures/full-project' )
22+ var fullProject = require ( './fixtures/full-project' ) ,
2123 fullProjectStr = JSON . stringify ( fullProject ) ,
2224 pbx = require ( '../lib/pbxProject' ) ,
2325 pbxFile = require ( '../lib/pbxFile' ) ,
@@ -27,38 +29,36 @@ function cleanHash() {
2729 return JSON . parse ( fullProjectStr ) ;
2830}
2931
30- exports . setUp = function ( callback ) {
31- proj . hash = cleanHash ( ) ;
32- callback ( ) ;
33- }
3432
3533var PRODUCT_NAME = '"KitchenSinktablet"' ;
3634
37- exports . addAndRemoveToFromHeaderSearchPaths = {
38- 'add should add the path to each configuration section' :function ( test ) {
35+ describe ( 'addAndRemoveToFromHeaderSearchPaths' , ( ) => {
36+ beforeEach ( ( ) => {
37+ proj . hash = cleanHash ( ) ;
38+ } ) ;
39+
40+ it ( 'add should add the path to each configuration section' , ( ) => {
3941 proj . addToHeaderSearchPaths ( {
4042 path :'some/path/include'
4143 } ) ;
4244 var config = proj . pbxXCBuildConfigurationSection ( ) ;
4345 for ( var ref in config ) {
4446 if ( ref . indexOf ( '_comment' ) > - 1 || config [ ref ] . buildSettings . PRODUCT_NAME != PRODUCT_NAME ) continue ;
4547 var lib = config [ ref ] . buildSettings . HEADER_SEARCH_PATHS ;
46- test . ok ( lib [ 1 ] . indexOf ( '$(SRCROOT)/KitchenSinktablet/some/path' ) > - 1 ) ;
48+ assert . ok ( lib [ 1 ] . indexOf ( '$(SRCROOT)/KitchenSinktablet/some/path' ) > - 1 ) ;
4749 }
48- test . done ( ) ;
49- } ,
50- 'add should not mangle string arguments and add to each config section' :function ( test ) {
50+ } ) ;
51+ it ( 'add should not mangle string arguments and add to each config section' , ( ) => {
5152 var includePath = '../../some/path' ;
5253 proj . addToHeaderSearchPaths ( includePath ) ;
5354 var config = proj . pbxXCBuildConfigurationSection ( ) ;
5455 for ( var ref in config ) {
5556 if ( ref . indexOf ( '_comment' ) > - 1 || config [ ref ] . buildSettings . PRODUCT_NAME != PRODUCT_NAME ) continue ;
5657 var lib = config [ ref ] . buildSettings . HEADER_SEARCH_PATHS ;
57- test . ok ( lib [ 1 ] . indexOf ( includePath ) > - 1 ) ;
58+ assert . ok ( lib [ 1 ] . indexOf ( includePath ) > - 1 ) ;
5859 }
59- test . done ( ) ;
60- } ,
61- 'remove should remove from the path to each configuration section' :function ( test ) {
60+ } ) ;
61+ it ( 'remove should remove from the path to each configuration section' , ( ) => {
6262 var libPath = 'some/path/include' ;
6363 proj . addToHeaderSearchPaths ( {
6464 path :libPath
@@ -70,9 +70,8 @@ exports.addAndRemoveToFromHeaderSearchPaths = {
7070 for ( var ref in config ) {
7171 if ( ref . indexOf ( '_comment' ) > - 1 || config [ ref ] . buildSettings . PRODUCT_NAME != PRODUCT_NAME ) continue ;
7272 var lib = config [ ref ] . buildSettings . HEADER_SEARCH_PATHS ;
73- test . ok ( lib . length === 1 ) ;
74- test . ok ( lib [ 0 ] . indexOf ( '$(SRCROOT)/KitchenSinktablet/some/path/include' ) == - 1 ) ;
73+ assert . ok ( lib . length === 1 ) ;
74+ assert . ok ( lib [ 0 ] . indexOf ( '$(SRCROOT)/KitchenSinktablet/some/path/include' ) == - 1 ) ;
7575 }
76- test . done ( ) ;
77- }
78- }
76+ } ) ;
77+ } ) ;
0 commit comments