Lines Matching refs:st
14 t.test('isCore()', function (st) { argument
15 st.ok(isCore('fs'));
16 st.ok(isCore('net'));
17 st.ok(isCore('http'));
19 st.ok(!isCore('seq'));
20 st.ok(!isCore('../'));
22 st.ok(!isCore('toString'));
24 st.end();
27 t.test('core list', function (st) { argument
29 st.plan(cores.length);
35 st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw');
37 st['throws'](requireFunc, mod + ' not supported; requiring throws');
41 st.end();
44 t.test('core via repl module', { skip: !data.repl }, function (st) { argument
47 st.skip('repl._builtinLibs does not exist');
51 st.ok(data[mod], mod + ' is a core module');
52 st.doesNotThrow(
58 st.doesNotThrow(
63 st['throws'](
71 st.end();
74 t.test('core via builtinModules list', { skip: !data.module }, function (st) { argument
77 st.skip('module.builtinModules does not exist');
93 st.ok(data[mod], mod + ' is a core module');
94 st.doesNotThrow(
100 st.doesNotThrow(
105 st['throws'](
114 st.end();
117 t.test('Object.prototype pollution', function (st) { argument
119 st.teardown(mockProperty(Object.prototype, 'fs', { value: false }));
120 st.teardown(mockProperty(Object.prototype, 'path', { value: '>= 999999999' }));
121 st.teardown(mockProperty(Object.prototype, 'http', { value: data.http }));
122 st.teardown(mockProperty(Object.prototype, nonKey, { value: true }));
124 st.equal(isCore('fs'), true, 'fs is a core module even if Object.prototype lies');
125 st.equal(isCore('path'), true, 'path is a core module even if Object.prototype lies');
126 st.equal(isCore('http'), true, 'path is a core module even if Object.prototype matches data');
127 …st.equal(isCore(nonKey), false, '"' + nonKey + '" is not a core module even if Object.prototype li…
129 st.end();