44
55var tape = require ( 'tape' ) ;
66var cwd = require ( '@stdlib/process/cwd' ) ;
7+ var IS_BROWSER = require ( '@stdlib/assert/is-browser' ) ;
78var chdir = require ( './../lib' ) ;
89
910
1011// VARIABLES //
1112
1213var DIR = cwd ( ) ;
14+ var opts = {
15+ 'skip' : IS_BROWSER
16+ } ;
1317
1418
1519// FUNCTIONS //
@@ -26,13 +30,13 @@ function restore() {
2630
2731// TESTS //
2832
29- tape ( 'main export is a function' , function test ( t ) {
33+ tape ( 'main export is a function' , opts , function test ( t ) {
3034 t . ok ( true , __filename ) ;
3135 t . equal ( typeof chdir , 'function' , 'main export is a function' ) ;
3236 t . end ( ) ;
3337} ) ;
3438
35- tape ( 'the function changes the working directory' , function test ( t ) {
39+ tape ( 'the function changes the working directory' , opts , function test ( t ) {
3640 var err = chdir ( __dirname ) ;
3741
3842 t . equal ( err , null , 'returns expected value' ) ;
@@ -44,7 +48,7 @@ tape( 'the function changes the working directory', function test( t ) {
4448 t . end ( ) ;
4549} ) ;
4650
47- tape ( 'if the function encounters an error when attempting to change the working directory, the function returns the error' , function test ( t ) {
51+ tape ( 'if the function encounters an error when attempting to change the working directory, the function returns the error' , opts , function test ( t ) {
4852 var err = chdir ( 'kjflajflsda/bkadlfjadlfksabldjkfklajsf/dkfaljsf' ) ; // non-existent directory
4953
5054 t . equal ( err instanceof Error , true , 'returns an error' ) ;
0 commit comments