|
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 |
|
@@ -255,19 +255,19 @@ assert.throws(function() {
|
255 | 255 | }, 'missing path');
|
256 | 256 |
|
257 | 257 | process.on('exit', function() {
|
258 |
| - assert.ok(common.indirectInstanceOf(a.A, Function)); |
| 258 | + assert.ok(a.A instanceof Function); |
259 | 259 | assert.equal('A done', a.A());
|
260 | 260 |
|
261 |
| - assert.ok(common.indirectInstanceOf(a.C, Function)); |
| 261 | + assert.ok(a.C instanceof Function); |
262 | 262 | assert.equal('C done', a.C());
|
263 | 263 |
|
264 |
| - assert.ok(common.indirectInstanceOf(a.D, Function)); |
| 264 | + assert.ok(a.D instanceof Function); |
265 | 265 | assert.equal('D done', a.D());
|
266 | 266 |
|
267 |
| - assert.ok(common.indirectInstanceOf(d.D, Function)); |
| 267 | + assert.ok(d.D instanceof Function); |
268 | 268 | assert.equal('D done', d.D());
|
269 | 269 |
|
270 |
| - assert.ok(common.indirectInstanceOf(d2.D, Function)); |
| 270 | + assert.ok(d2.D instanceof Function); |
271 | 271 | assert.equal('D done', d2.D());
|
272 | 272 |
|
273 | 273 | assert.equal(true, errorThrown);
|
|
0 commit comments