Skip to content

Commit

Permalink
Disable tests for all except primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Sep 9, 2023
1 parent fbfaab8 commit eee1bdd
Show file tree
Hide file tree
Showing 28 changed files with 43 additions and 42 deletions.
3 changes: 2 additions & 1 deletion test/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports = {
'itSerializesEntriesEqual.each'
]
}
]
],
'jest/no-disabled-tests': ['off']
}
};
4 changes: 2 additions & 2 deletions test/arguments.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const itSerializes = require('./support/index.js').itSerializes.withOptions({str

// Tests

describe('Arguments object', () => {
describe.skip('Arguments object', () => {
itSerializes('empty', {
in() {
function createArgs() { return arguments; }
Expand Down Expand Up @@ -303,7 +303,7 @@ describe('Arguments object', () => {
});
});

describe('Functions including `arguments`', () => {
describe.skip('Functions including `arguments`', () => {
describe('referencing upper function scope', () => {
describe('1 level up', () => {
itSerializes('single instantiation', {
Expand Down
2 changes: 1 addition & 1 deletion test/arrays.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {itSerializesEqual} = require('./support/index.js');

// Tests

describe('Arrays', () => {
describe.skip('Arrays', () => {
itSerializesEqual('empty array', {
in: () => [],
out: '[]'
Expand Down
10 changes: 5 additions & 5 deletions test/boxed.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {itSerializes, itSerializesEqual} = require('./support/index.js');

// Tests

describe('Boxed Strings', () => {
describe.skip('Boxed Strings', () => {
itSerializes('non-empty string', {
in: () => new String('abc'),
out: 'new String("abc")',
Expand Down Expand Up @@ -99,7 +99,7 @@ describe('Boxed Strings', () => {
});
});

describe('Boxed Booleans', () => {
describe.skip('Boxed Booleans', () => {
itSerializesEqual('true', {
in: () => new Boolean(true),
out: 'new Boolean(1)',
Expand Down Expand Up @@ -165,7 +165,7 @@ describe('Boxed Booleans', () => {
});
});

describe('Boxed Numbers', () => {
describe.skip('Boxed Numbers', () => {
itSerializesEqual('positive integer', {
in: () => new Number(1),
out: 'new Number(1)',
Expand Down Expand Up @@ -301,7 +301,7 @@ describe('Boxed Numbers', () => {
});
});

describe('Boxed BigInts', () => {
describe.skip('Boxed BigInts', () => {
itSerializesEqual('zero', {
in: () => Object(BigInt(0)),
out: 'Object(0n)',
Expand Down Expand Up @@ -388,7 +388,7 @@ describe('Boxed BigInts', () => {
});
});

describe('Boxed Symbols', () => {
describe.skip('Boxed Symbols', () => {
itSerializesEqual('without description', {
in: () => Object(Symbol()), // eslint-disable-line symbol-description
out: 'Object(Symbol())',
Expand Down
2 changes: 1 addition & 1 deletion test/buffers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {itSerializes, itSerializesEqual} = require('./support/index.js');

// Tests

describe('Buffers', () => {
describe.skip('Buffers', () => {
describe('nodeJS Buffers', () => {
itSerializesEqual('without extra props', {
in: () => Buffer.from('ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
Expand Down
2 changes: 1 addition & 1 deletion test/builtInFunctions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {itSerializes} = require('./support/index.js');

// Tests

describe('Built-in functions', () => {
describe.skip('Built-in functions', () => {
describe("require('util').promisify", () => {
itSerializes('simple', {
in: () => promisify(cb => cb(null, 1)),
Expand Down
2 changes: 1 addition & 1 deletion test/builtInModules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const pathModule = require('path'), // eslint-disable-line import/order

// Tests

describe('Built-in modules', () => {
describe.skip('Built-in modules', () => {
describe('top level', () => {
describe('single occurance', () => {
itSerializesEqual('JS format', {
Expand Down
2 changes: 1 addition & 1 deletion test/cjs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {itSerializesEqual, stripSourceMapComment} = require('./support/index.js')

// Tests

describe('CJS output format', () => {
describe.skip('CJS output format', () => {
itSerializesEqual('protects `module` var', {
in: () => ({module: {a: 1}}),
format: 'cjs',
Expand Down
2 changes: 1 addition & 1 deletion test/classes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const {itSerializes} = require('./support/index.js');

const spy = jest.fn;

describe('Classes', () => {
describe.skip('Classes', () => {
describe('empty class', () => {
itSerializes('anonymous', {
in: () => class {},
Expand Down
8 changes: 4 additions & 4 deletions test/commonjs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {itSerializes, itSerializesEqual, stripLineBreaks} = require('./support/in

// Tests

describe('`module`', () => {
describe.skip('`module`', () => {
itSerializes('exported directly', {
in: 'module.exports = module;',
out: '(()=>{const a={};a.exports=a;return a})()',
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('`module`', () => {
});
});

describe('`exports`', () => {
describe.skip('`exports`', () => {
itSerializes('is resolved correctly in scope of function', {
in: `
'use strict';
Expand All @@ -91,7 +91,7 @@ describe('`exports`', () => {
});
});

describe('`__dirname`', () => {
describe.skip('`__dirname`', () => {
itSerializesEqual('exported directly is source path', {
in: () => __dirname,
out: `${JSON.stringify(__dirname)}`,
Expand Down Expand Up @@ -121,7 +121,7 @@ describe('`__dirname`', () => {
});
});

describe('`__filename`', () => {
describe.skip('`__filename`', () => {
itSerializesEqual('exported directly is source path', {
in: () => __filename,
out: `${JSON.stringify(__filename)}`,
Expand Down
2 changes: 1 addition & 1 deletion test/eval.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {

// Tests

describe('eval', () => {
describe.skip('eval', () => {
describe('serialized', () => {
itSerializes('directly', {
in: () => eval,
Expand Down
2 changes: 1 addition & 1 deletion test/functions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {itSerializes, stripSourceMapComment, stripLineBreaks} = require('./suppor

const spy = jest.fn;

describe('Functions', () => {
describe.skip('Functions', () => {
describe('without scope', () => {
describe('single instantiation of function', () => {
describe('arrow function', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/globals.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {itSerializesEqual, stripSourceMapComment} = require('./support/index.js')

// Tests

describe('Globals', () => {
describe.skip('Globals', () => {
itSerializesEqual('`globalThis`', {
in: () => global,
out: 'globalThis',
Expand Down
2 changes: 1 addition & 1 deletion test/instances.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {itSerializesEqual} = require('./support/index.js');

// Tests

describe('Instances', () => {
describe.skip('Instances', () => {
itSerializesEqual('empty object', {
in() {
function F() {}
Expand Down
4 changes: 2 additions & 2 deletions test/maps.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {itSerializes, itSerializesEqual} = require('./support/index.js');

// Tests

describe('Maps', () => {
describe.skip('Maps', () => {
itSerializesEqual('no entries', {
in: () => new Map(),
out: 'new Map',
Expand Down Expand Up @@ -196,7 +196,7 @@ describe('Maps', () => {
});
});

describe('WeakMaps', () => {
describe.skip('WeakMaps', () => {
it('calling `WeakMap()` without `new` throws error', () => {
expect(() => WeakMap()).toThrowWithMessage(
TypeError, "Class constructor WeakMap cannot be invoked without 'new'"
Expand Down
2 changes: 1 addition & 1 deletion test/methods.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {itSerializes} = require('./support/index.js');

const unsafeNumberString = (BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)).toString();

describe('Object methods', () => {
describe.skip('Object methods', () => {
describe('without descriptors', () => {
itSerializes('plain', {
in() {
Expand Down
2 changes: 1 addition & 1 deletion test/misc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {itSerializes, transpiledFiles} = require('./support/index.js');
// Tests
const ext = {};

describe('Internal vars created by instrumentation do not interfere with code', () => {
describe.skip('Internal vars created by instrumentation do not interfere with code', () => {
itSerializes('`tracker`', {
in() {
return () => typeof livepack_tracker; // eslint-disable-line camelcase
Expand Down
2 changes: 1 addition & 1 deletion test/objects.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const {itSerializes, itSerializesEqual} = require('./support/index.js');

const unsafeNumberString = (BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)).toString();

describe('Objects', () => {
describe.skip('Objects', () => {
itSerializesEqual('empty object', {
in: () => ({}),
out: '{}'
Expand Down
2 changes: 1 addition & 1 deletion test/options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {serialize} = require('livepack');

// Tests

describe('Options', () => {
describe.skip('Options', () => {
describe('format', () => {
it('default', () => {
expect(serialize(1)).toBe('1');
Expand Down
10 changes: 5 additions & 5 deletions test/other.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {itSerializes, itSerializesEqual} = require('./support/index.js');
const urlsHaveContext = parseNodeVersion(process.version).major < 20,
itSerializesEqualIfUrlsHaveContext = urlsHaveContext ? itSerializesEqual : itSerializesEqual.skip;

describe('RegExps', () => {
describe.skip('RegExps', () => {
itSerializesEqual('with no flags', {
in: () => /^foo$/,
out: '/^foo$/',
Expand Down Expand Up @@ -77,7 +77,7 @@ describe('RegExps', () => {
});
});

describe('Dates', () => {
describe.skip('Dates', () => {
itSerializesEqual('without extra props', {
in: () => new Date('01/01/2020 12:00:00'),
out: 'new Date(1577880000000)',
Expand Down Expand Up @@ -127,7 +127,7 @@ describe('Dates', () => {
});
});

describe('URLs', () => {
describe.skip('URLs', () => {
itSerializesEqual('URL', {
in: () => new URL('http://foo.com/path/to/file.html?a=1&b=2'),
out: 'new URL("http://foo.com/path/to/file.html?a=1&b=2")',
Expand Down Expand Up @@ -164,7 +164,7 @@ describe('URLs', () => {
});
});

describe('URLSearchParams', () => {
describe.skip('URLSearchParams', () => {
itSerializesEqual('without context', {
in: () => new URLSearchParams('a=1&b=2'),
out: 'new URLSearchParams("a=1&b=2")',
Expand Down Expand Up @@ -220,7 +220,7 @@ describe('URLSearchParams', () => {
});
});

describe('TypedArray', () => {
describe.skip('TypedArray', () => {
itSerializesEqual('class', {
in: () => Object.getPrototypeOf(Uint8Array), // TypedArray
out: 'Object.getPrototypeOf(Uint8Array)',
Expand Down
2 changes: 1 addition & 1 deletion test/prototypes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {itSerializes} = require('./support/index.js');

// Tests

describe('Prototypes', () => {
describe.skip('Prototypes', () => {
describe('function expressions', () => {
describe('prototype not altered and', () => {
itSerializes('function has no other props', {
Expand Down
2 changes: 1 addition & 1 deletion test/register.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const {serializeInNewProcess} = require('./support/index.js');

// Tests

describe('register', () => {
describe.skip('register', () => {
it('allows serializing functions', async () => {
const js = await serializeInNewProcess(
'const extA = 123;\n'
Expand Down
4 changes: 2 additions & 2 deletions test/sets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {itSerializes, itSerializesEqual} = require('./support/index.js');

// Tests

describe('Sets', () => {
describe.skip('Sets', () => {
itSerializesEqual('no entries', {
in: () => new Set(),
out: 'new Set',
Expand Down Expand Up @@ -187,7 +187,7 @@ describe('Sets', () => {
});
});

describe('WeakSets', () => {
describe.skip('WeakSets', () => {
it('calling `WeakSet()` without `new` throws error', () => {
expect(() => WeakSet()).toThrowWithMessage(
TypeError, "Class constructor WeakSet cannot be invoked without 'new'"
Expand Down
2 changes: 1 addition & 1 deletion test/sourceMaps.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {withFixtures} = require('./support/index.js');

// Tests

describe('Source maps', () => {
describe.skip('Source maps', () => {
it("output inline if `sourceMaps` option 'inline'", () => {
const out = serialize(1, {sourceMaps: 'inline'});
expect(out).toMatch(/^1\n\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,.+$/);
Expand Down
2 changes: 1 addition & 1 deletion test/split.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const {itSerializes, stripSourceMapComment, stripLineBreaks} = require('./suppor
const itSerializesEntries = itSerializes.withOptions({entries: true, format: ['cjs', 'esm', 'js']}),
itSerializesEntriesEqual = itSerializesEntries.withOptions({equal: true});

describe('Code splitting', () => {
describe.skip('Code splitting', () => {
describe('serializeEntries()', () => {
itSerializesEntriesEqual('outputs primitives in separate files', {
in: () => ({
Expand Down
2 changes: 1 addition & 1 deletion test/splitAsync.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const NUM_FIXTURES = 5;
const fixturesPaths = new Array(NUM_FIXTURES).fill()
.map((_, index) => pathJoin(__dirname, `fixtures/splitAsync/${index}.js`));

describe('splitAsync', () => {
describe.skip('splitAsync', () => {
runTests(
(val, index) => {
if (!val) val = {x: index || 0};
Expand Down
2 changes: 1 addition & 1 deletion test/strict.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const {itSerializes} = require('./support/index.js');

const itSerializesEntries = itSerializes.withOptions({entries: true});

describe('Strict mode', () => {
describe.skip('Strict mode', () => {
describe('single function', () => {
describe('strict mode function', () => {
itSerializes('in strict env has directive removed', {
Expand Down
2 changes: 1 addition & 1 deletion test/symbols.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {itSerializes, stripSourceMapComment} = require('./support/index.js');

// Tests

describe('Symbols', () => {
describe.skip('Symbols', () => {
itSerializes('named symbol', {
in: () => Symbol('foo'),
out: 'Symbol("foo")',
Expand Down

0 comments on commit eee1bdd

Please sign in to comment.