'use strict' ; import * as path from 'path' ; import * as assert from 'assert' ; import * as ttm from 'azure-pipelines-task-lib/mock-test' ; describe ( 'ipa-resign L0 Suite' , function ( ) { before ( ( ) => { } ) ; after ( ( ) => { } ) ; this . timeout ( parseInt ( process . env . TASK_TEST_TIMEOUT ) || 20000 ) ; it ( 'enforce darwin' , ( done ) => { this . timeout ( 1000 ) ; let tp = path . join ( __dirname , 'L0EnforceDarwin.js' ) ; let tr = new ttm . MockTestRunner ( tp ) ; try { tr . run ( ) ; assert . equal ( true , tr . createdErrorIssue ( 'Error: loc_mock_DarwinOnly' ) , 'Expected error message was not found' ) ; assert ( tr . failed , 'Task should have failed' ) ; done ( ) ; } catch ( err ) { console . log ( tr . stdout ) ; console . log ( tr . stderr ) ; console . log ( err ) ; done ( err ) ; } } ) ; } ) ;