Skip to content

Commit

Permalink
Cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
raphinesse committed Apr 27, 2019
1 parent 71d09c9 commit 284f75b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/test.require.js
Expand Up @@ -85,6 +85,7 @@ describe('require + define', function () {
define('ModuleB', function (require, exports, module) {
require('ModuleA');
});

expect(function () {
require('ModuleA');
}).toThrow('Cycle in require graph: ModuleA->ModuleB->ModuleA');
Expand All @@ -100,6 +101,7 @@ describe('require + define', function () {
define('ModuleC', function (require, exports, module) {
require('ModuleA');
});

expect(function () {
require('ModuleA');
}).toThrow('Cycle in require graph: ModuleA->ModuleB->ModuleC->ModuleA');
Expand All @@ -122,8 +124,7 @@ describe('require + define', function () {
exports.stuff = 'asdf';
});

var v = require('a');
expect(v.stuff).toBe('asdf');
expect(require('a').stuff).toBe('asdf');
});

it('Test#010 : can use both the exports and module.exports object', function () {
Expand All @@ -132,9 +133,7 @@ describe('require + define', function () {
module.exports.b = 'b';
});

var v = require('a');
expect(v.a).toBe('a');
expect(v.b).toBe('b');
expect(require('a')).toEqual({ a: 'a', b: 'b' });
});

it('Test#011 : returns what is assigned to module.exports', function () {
Expand Down

0 comments on commit 284f75b

Please sign in to comment.