Skip to content

Commit 35b14aa

Browse files
committed
Add test and add environment check
1 parent 0cf9c99 commit 35b14aa

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

lib/node_modules/@stdlib/process/env/test/test.browser.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// MODULES //
44

55
var tape = require( 'tape' );
6+
var isEmptyObject = require( '@stdlib/assert/is-empty-object' );
67
var 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+
});

lib/node_modules/@stdlib/process/env/test/test.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
1-
/* eslint-disable no-restricted-syntax */
21
'use strict';
32

43
// MODULES //
54

65
var tape = require( 'tape' );
6+
var IS_BROWSER = require( '@stdlib/assert/is-browser' );
77
var 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();

0 commit comments

Comments
 (0)