Skip to content

Commit 4608748

Browse files
committedNov 2, 2022
test: add test for gh-11943
1 parent d962724 commit 4608748

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎.github/workflows/test.yml

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
ln -s `pwd` ./test/typescript/node_modules/mongoose
4242
echo `pwd`/mongodb-linux-x86_64-ubuntu1804-4.0.2/bin >> $GITHUB_PATH
4343
44+
- run: npm run build-browser
45+
4446
- run: npm test
4547

4648
lint:

‎test/browser.test.js

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ describe('browser', function() {
2020
exec('node --eval "require(\'./lib/browser\')"', done);
2121
});
2222

23+
it('require() works in an environment where process.versions is an empty object (gh-5842)', function(done) {
24+
exec('node --eval "Object.defineProperty(process, \'versions\', { value: {} }); require(\'./dist/browser.umd\')"', done);
25+
});
26+
2327
it('using schema (gh-7170)', function(done) {
2428
exec('node --eval "const mongoose = require(\'./lib/browser\'); new mongoose.Schema();"', done);
2529
});

0 commit comments

Comments
 (0)
Please sign in to comment.