File tree Expand file tree Collapse file tree
lib/node_modules/@stdlib/process/env/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33// MODULES //
44
55var tape = require ( 'tape' ) ;
6+ var isEmptyObject = require ( '@stdlib/assert/is-empty-object' ) ;
67var ENV = require ( './../lib/browser.js' ) ;
78
89
@@ -13,3 +14,8 @@ tape( 'main export is an object', function test( t ) {
1314 t . strictEqual ( typeof ENV , 'object' , 'main export is an object' ) ;
1415 t . end ( ) ;
1516} ) ;
17+
18+ tape ( 'the export is an empty object' , function test ( t ) {
19+ t . strictEqual ( isEmptyObject ( ENV ) , true , 'is empty' ) ;
20+ t . end ( ) ;
21+ } ) ;
Original file line number Diff line number Diff line change 1- /* eslint-disable no-restricted-syntax */
21'use strict' ;
32
43// MODULES //
54
65var tape = require ( 'tape' ) ;
6+ var IS_BROWSER = require ( '@stdlib/assert/is-browser' ) ;
77var ENV = require ( './../lib' ) ;
88
99
10+ // VARIABLES //
11+
12+ var opts = {
13+ 'skip' : IS_BROWSER
14+ } ;
15+
16+
1017// TESTS //
1118
12- tape ( 'main export is an object' , function test ( t ) {
19+ tape ( 'main export is an object' , opts , function test ( t ) {
1320 t . ok ( true , __filename ) ;
1421 t . strictEqual ( typeof ENV , 'object' , 'main export is an object' ) ;
1522 t . end ( ) ;
1623} ) ;
1724
18- tape ( 'the export is an alias for `process.env`' , function test ( t ) {
25+ tape ( 'the export is an alias for `process.env`' , opts , function test ( t ) {
1926 // eslint-disable-next-line no-process-env
2027 t . strictEqual ( ENV , process . env , 'is an alias' ) ;
2128 t . end ( ) ;
You can’t perform that action at this time.
0 commit comments