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 a903d4d commit 365a566
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/test.require.js
Expand Up @@ -87,6 +87,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 @@ -102,6 +103,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 @@ -124,8 +126,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 @@ -134,9 +135,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 365a566

Please sign in to comment.