|
1 | 1 | 'use strict'; |
2 | | -var common = require('../common'); |
| 2 | +require('../common'); |
3 | 3 | var assert = require('assert'); |
4 | 4 | var path = require('path'); |
5 | 5 | var fs = require('fs'); |
@@ -33,25 +33,25 @@ var d4 = require('../fixtures/b/d'); |
33 | 33 |
|
34 | 34 | assert.equal(false, false, 'testing the test program.'); |
35 | 35 |
|
36 | | -assert.equal(true, common.indirectInstanceOf(a.A, Function)); |
| 36 | +assert.ok(a.A instanceof Function); |
37 | 37 | assert.equal('A', a.A()); |
38 | 38 |
|
39 | | -assert.equal(true, common.indirectInstanceOf(a.C, Function)); |
| 39 | +assert.ok(a.C instanceof Function); |
40 | 40 | assert.equal('C', a.C()); |
41 | 41 |
|
42 | | -assert.equal(true, common.indirectInstanceOf(a.D, Function)); |
| 42 | +assert.ok(a.D instanceof Function); |
43 | 43 | assert.equal('D', a.D()); |
44 | 44 |
|
45 | | -assert.equal(true, common.indirectInstanceOf(d.D, Function)); |
| 45 | +assert.ok(d.D instanceof Function); |
46 | 46 | assert.equal('D', d.D()); |
47 | 47 |
|
48 | | -assert.equal(true, common.indirectInstanceOf(d2.D, Function)); |
| 48 | +assert.ok(d2.D instanceof Function); |
49 | 49 | assert.equal('D', d2.D()); |
50 | 50 |
|
51 | | -assert.equal(true, common.indirectInstanceOf(d3.D, Function)); |
| 51 | +assert.ok(d3.D instanceof Function); |
52 | 52 | assert.equal('D', d3.D()); |
53 | 53 |
|
54 | | -assert.equal(true, common.indirectInstanceOf(d4.D, Function)); |
| 54 | +assert.ok(d4.D instanceof Function); |
55 | 55 | assert.equal('D', d4.D()); |
56 | 56 |
|
57 | 57 | assert.ok((new a.SomeClass()) instanceof c.SomeClass); |
@@ -88,7 +88,7 @@ require('../fixtures/node_modules/foo'); |
88 | 88 | console.error('test name clashes'); |
89 | 89 | // this one exists and should import the local module |
90 | 90 | var my_path = require('../fixtures/path'); |
91 | | -assert.ok(common.indirectInstanceOf(my_path.path_func, Function)); |
| 91 | +assert.ok(my_path.path_func instanceof Function); |
92 | 92 | // this one does not exist and should throw |
93 | 93 | assert.throws(function() { require('./utils'); }); |
94 | 94 |
|
@@ -259,19 +259,19 @@ assert.throws(function() { |
259 | 259 | }, 'missing path'); |
260 | 260 |
|
261 | 261 | process.on('exit', function() { |
262 | | - assert.ok(common.indirectInstanceOf(a.A, Function)); |
| 262 | + assert.ok(a.A instanceof Function); |
263 | 263 | assert.equal('A done', a.A()); |
264 | 264 |
|
265 | | - assert.ok(common.indirectInstanceOf(a.C, Function)); |
| 265 | + assert.ok(a.C instanceof Function); |
266 | 266 | assert.equal('C done', a.C()); |
267 | 267 |
|
268 | | - assert.ok(common.indirectInstanceOf(a.D, Function)); |
| 268 | + assert.ok(a.D instanceof Function); |
269 | 269 | assert.equal('D done', a.D()); |
270 | 270 |
|
271 | | - assert.ok(common.indirectInstanceOf(d.D, Function)); |
| 271 | + assert.ok(d.D instanceof Function); |
272 | 272 | assert.equal('D done', d.D()); |
273 | 273 |
|
274 | | - assert.ok(common.indirectInstanceOf(d2.D, Function)); |
| 274 | + assert.ok(d2.D instanceof Function); |
275 | 275 | assert.equal('D done', d2.D()); |
276 | 276 |
|
277 | 277 | assert.equal(true, errorThrown); |
|
0 commit comments