aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ava
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/ava')
-rw-r--r--node_modules/ava/.iron-node.js7
-rw-r--r--node_modules/ava/api.js296
-rwxr-xr-xnode_modules/ava/cli.js20
-rw-r--r--node_modules/ava/index.js8
-rw-r--r--node_modules/ava/index.js.flow166
-rw-r--r--node_modules/ava/lib/assert.js449
-rw-r--r--node_modules/ava/lib/ava-error.js10
-rw-r--r--node_modules/ava/lib/ava-files.js287
-rw-r--r--node_modules/ava/lib/babel-config.js156
-rw-r--r--node_modules/ava/lib/beautify-stack.js72
-rw-r--r--node_modules/ava/lib/caching-precompiler.js108
-rw-r--r--node_modules/ava/lib/cli.js210
-rw-r--r--node_modules/ava/lib/code-excerpt.js57
-rw-r--r--node_modules/ava/lib/colors.js16
-rw-r--r--node_modules/ava/lib/concordance-options.js130
-rw-r--r--node_modules/ava/lib/concurrent.js64
-rw-r--r--node_modules/ava/lib/enhance-assert.js53
-rw-r--r--node_modules/ava/lib/fork.js176
-rw-r--r--node_modules/ava/lib/globals.js10
-rw-r--r--node_modules/ava/lib/logger.js92
-rw-r--r--node_modules/ava/lib/main.js105
-rw-r--r--node_modules/ava/lib/prefix-title.js21
-rw-r--r--node_modules/ava/lib/process-adapter.js103
-rw-r--r--node_modules/ava/lib/reporters/format-serialized-error.js26
-rw-r--r--node_modules/ava/lib/reporters/improper-usage-messages.js56
-rw-r--r--node_modules/ava/lib/reporters/mini.js333
-rw-r--r--node_modules/ava/lib/reporters/tap.js132
-rw-r--r--node_modules/ava/lib/reporters/verbose.js204
-rw-r--r--node_modules/ava/lib/run-status.js136
-rw-r--r--node_modules/ava/lib/runner.js232
-rw-r--r--node_modules/ava/lib/sequence.js94
-rw-r--r--node_modules/ava/lib/serialize-error.js99
-rw-r--r--node_modules/ava/lib/snapshot-manager.js418
-rw-r--r--node_modules/ava/lib/test-collection.js230
-rw-r--r--node_modules/ava/lib/test-worker.js141
-rw-r--r--node_modules/ava/lib/test.js441
-rw-r--r--node_modules/ava/lib/validate-test.js48
-rw-r--r--node_modules/ava/lib/watcher.js376
-rw-r--r--node_modules/ava/license9
l---------node_modules/ava/node_modules/.bin/import-local-fixture1
l---------node_modules/ava/node_modules/.bin/js-yaml1
l---------node_modules/ava/node_modules/.bin/semver1
-rw-r--r--node_modules/ava/node_modules/ansi-regex/index.js10
-rw-r--r--node_modules/ava/node_modules/ansi-regex/license9
-rw-r--r--node_modules/ava/node_modules/ansi-regex/package.json53
-rw-r--r--node_modules/ava/node_modules/ansi-regex/readme.md46
-rw-r--r--node_modules/ava/node_modules/debug/CHANGELOG.md395
-rw-r--r--node_modules/ava/node_modules/debug/LICENSE19
-rw-r--r--node_modules/ava/node_modules/debug/README.md437
-rw-r--r--node_modules/ava/node_modules/debug/node.js1
-rw-r--r--node_modules/ava/node_modules/debug/package.json51
-rw-r--r--node_modules/ava/node_modules/debug/src/browser.js180
-rw-r--r--node_modules/ava/node_modules/debug/src/index.js12
-rw-r--r--node_modules/ava/node_modules/debug/src/node.js174
-rw-r--r--node_modules/ava/node_modules/ms/index.js162
-rw-r--r--node_modules/ava/node_modules/ms/license.md21
-rw-r--r--node_modules/ava/node_modules/ms/package.json37
-rw-r--r--node_modules/ava/node_modules/ms/readme.md60
-rw-r--r--node_modules/ava/node_modules/strip-ansi/index.js4
-rw-r--r--node_modules/ava/node_modules/strip-ansi/license9
-rw-r--r--node_modules/ava/node_modules/strip-ansi/package.json52
-rw-r--r--node_modules/ava/node_modules/strip-ansi/readme.md39
-rw-r--r--node_modules/ava/package.json192
-rw-r--r--node_modules/ava/profile.js161
-rw-r--r--node_modules/ava/readme.md1234
-rw-r--r--node_modules/ava/types/generated.d.ts1150
-rw-r--r--node_modules/ava/types/make.js184
67 files changed, 0 insertions, 10286 deletions
diff --git a/node_modules/ava/.iron-node.js b/node_modules/ava/.iron-node.js
deleted file mode 100644
index dc31ccece..000000000
--- a/node_modules/ava/.iron-node.js
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- app: {
- openDevToolsDetached: true,
- hideMainWindow: true
- },
- workSpaceDirectory: () => __dirname
-};
diff --git a/node_modules/ava/api.js b/node_modules/ava/api.js
deleted file mode 100644
index 9c6e775d6..000000000
--- a/node_modules/ava/api.js
+++ /dev/null
@@ -1,296 +0,0 @@
-'use strict';
-const EventEmitter = require('events');
-const path = require('path');
-const fs = require('fs');
-const os = require('os');
-const commonPathPrefix = require('common-path-prefix');
-const uniqueTempDir = require('unique-temp-dir');
-const findCacheDir = require('find-cache-dir');
-const isCi = require('is-ci');
-const resolveCwd = require('resolve-cwd');
-const debounce = require('lodash.debounce');
-const autoBind = require('auto-bind');
-const Promise = require('bluebird');
-const getPort = require('get-port');
-const arrify = require('arrify');
-const ms = require('ms');
-const babelConfigHelper = require('./lib/babel-config');
-const CachingPrecompiler = require('./lib/caching-precompiler');
-const RunStatus = require('./lib/run-status');
-const AvaError = require('./lib/ava-error');
-const AvaFiles = require('./lib/ava-files');
-const fork = require('./lib/fork');
-
-function resolveModules(modules) {
- return arrify(modules).map(name => {
- const modulePath = resolveCwd.silent(name);
-
- if (modulePath === null) {
- throw new Error(`Could not resolve required module '${name}'`);
- }
-
- return modulePath;
- });
-}
-
-function getBlankResults() {
- return {
- stats: {
- knownFailureCount: 0,
- testCount: 0,
- passCount: 0,
- skipCount: 0,
- todoCount: 0,
- failCount: 0
- },
- tests: []
- };
-}
-
-class Api extends EventEmitter {
- constructor(options) {
- super();
- autoBind(this);
-
- this.options = Object.assign({match: []}, options);
- this.options.require = resolveModules(this.options.require);
- }
-
- _runFile(file, runStatus, execArgv) {
- const hash = this.precompiler.precompileFile(file);
- const precompiled = Object.assign({}, this._precompiledHelpers);
- const resolvedfpath = fs.realpathSync(file);
- precompiled[resolvedfpath] = hash;
-
- const options = Object.assign({}, this.options, {precompiled});
- if (runStatus.updateSnapshots) {
- // Don't use in Object.assign() since it'll override options.updateSnapshots even when false.
- options.updateSnapshots = true;
- }
- const emitter = fork(file, options, execArgv);
- runStatus.observeFork(emitter);
-
- return emitter;
- }
-
- run(files, options) {
- return new AvaFiles({cwd: this.options.resolveTestsFrom, files})
- .findTestFiles()
- .then(files => this._run(files, options));
- }
-
- _onTimeout(runStatus) {
- const timeout = ms(this.options.timeout);
- const err = new AvaError(`Exited because no new tests completed within the last ${timeout}ms of inactivity`);
- this._handleError(runStatus, err);
- runStatus.emit('timeout');
- }
-
- _setupTimeout(runStatus) {
- const timeout = ms(this.options.timeout);
-
- runStatus._restartTimer = debounce(() => {
- this._onTimeout(runStatus);
- }, timeout);
-
- runStatus._restartTimer();
- runStatus.on('test', runStatus._restartTimer);
- }
-
- _cancelTimeout(runStatus) {
- runStatus._restartTimer.cancel();
- }
-
- _setupPrecompiler(files) {
- const isCacheEnabled = this.options.cacheEnabled !== false;
- let cacheDir = uniqueTempDir();
-
- if (isCacheEnabled) {
- const foundDir = findCacheDir({
- name: 'ava',
- files
- });
- if (foundDir !== null) {
- cacheDir = foundDir;
- }
- }
-
- this.options.cacheDir = cacheDir;
-
- const isPowerAssertEnabled = this.options.powerAssert !== false;
- return babelConfigHelper.build(this.options.projectDir, cacheDir, this.options.babelConfig, isPowerAssertEnabled)
- .then(result => {
- this.precompiler = new CachingPrecompiler({
- path: cacheDir,
- getBabelOptions: result.getOptions,
- babelCacheKeys: result.cacheKeys
- });
- });
- }
-
- _precompileHelpers() {
- this._precompiledHelpers = {};
-
- // Assumes the tests only load helpers from within the `resolveTestsFrom`
- // directory. Without arguments this is the `projectDir`, else it's
- // `process.cwd()` which may be nested too deeply. This will be solved
- // as we implement RFC 001 and move helper compilation into the worker
- // processes, avoiding the need for precompilation.
- return new AvaFiles({cwd: this.options.resolveTestsFrom})
- .findTestHelpers()
- .map(file => { // eslint-disable-line array-callback-return
- const hash = this.precompiler.precompileFile(file);
- this._precompiledHelpers[file] = hash;
- });
- }
-
- _run(files, options) {
- options = options || {};
-
- const runStatus = new RunStatus({
- runOnlyExclusive: options.runOnlyExclusive,
- prefixTitles: this.options.explicitTitles || files.length > 1,
- base: path.relative(process.cwd(), commonPathPrefix(files)) + path.sep,
- failFast: this.options.failFast,
- updateSnapshots: options.updateSnapshots
- });
-
- this.emit('test-run', runStatus, files);
-
- if (files.length === 0) {
- const err = new AvaError('Couldn\'t find any files to test');
- this._handleError(runStatus, err);
- return Promise.resolve(runStatus);
- }
-
- return this._setupPrecompiler(files)
- .then(() => this._precompileHelpers())
- .then(() => {
- if (this.options.timeout) {
- this._setupTimeout(runStatus);
- }
-
- let concurrency = Math.min(os.cpus().length, isCi ? 2 : Infinity);
-
- if (this.options.concurrency > 0) {
- concurrency = this.options.concurrency;
- }
-
- if (this.options.serial) {
- concurrency = 1;
- }
-
- return this._runWithPool(files, runStatus, concurrency);
- });
- }
-
- _computeForkExecArgs(files) {
- const execArgv = this.options.testOnlyExecArgv || process.execArgv;
- let debugArgIndex = -1;
-
- // --inspect-brk is used in addition to --inspect to break on first line and wait
- execArgv.some((arg, index) => {
- const isDebugArg = /^--inspect(-brk)?($|=)/.test(arg);
- if (isDebugArg) {
- debugArgIndex = index;
- }
-
- return isDebugArg;
- });
-
- const isInspect = debugArgIndex >= 0;
- if (!isInspect) {
- execArgv.some((arg, index) => {
- const isDebugArg = /^--debug(-brk)?($|=)/.test(arg);
- if (isDebugArg) {
- debugArgIndex = index;
- }
-
- return isDebugArg;
- });
- }
-
- if (debugArgIndex === -1) {
- return Promise.resolve([]);
- }
-
- return Promise
- .map(files, () => getPort())
- .map(port => {
- const forkExecArgv = execArgv.slice();
- let flagName = isInspect ? '--inspect' : '--debug';
- const oldValue = forkExecArgv[debugArgIndex];
- if (oldValue.indexOf('brk') > 0) {
- flagName += '-brk';
- }
-
- forkExecArgv[debugArgIndex] = `${flagName}=${port}`;
-
- return forkExecArgv;
- });
- }
-
- _handleError(runStatus, err) {
- runStatus.handleExceptions({
- exception: err,
- file: err.file ? path.relative(process.cwd(), err.file) : undefined
- });
- }
-
- _runWithPool(files, runStatus, concurrency) {
- const tests = [];
- let execArgvList;
-
- runStatus.on('timeout', () => {
- tests.forEach(fork => {
- fork.exit();
- });
- });
-
- return this._computeForkExecArgs(files)
- .then(argvList => {
- execArgvList = argvList;
- })
- .return(files)
- .map((file, index) => {
- return new Promise(resolve => {
- const forkArgs = execArgvList[index];
- const test = this._runFile(file, runStatus, forkArgs);
- tests.push(test);
-
- // If we're looking for matches, run every single test process in exclusive-only mode
- const options = {
- runOnlyExclusive: this.options.match.length > 0
- };
-
- resolve(test.run(options));
- }).catch(err => {
- err.file = file;
- this._handleError(runStatus, err);
- return getBlankResults();
- });
- }, {concurrency})
- .then(results => {
- // Filter out undefined results (usually result of caught exceptions)
- results = results.filter(Boolean);
-
- // Cancel debounced _onTimeout() from firing
- if (this.options.timeout) {
- this._cancelTimeout(runStatus);
- }
-
- if (this.options.match.length > 0 && !runStatus.hasExclusive) {
- results = [];
-
- const err = new AvaError('Couldn\'t find any matching tests');
- this._handleError(runStatus, err);
- }
-
- runStatus.processResults(results);
-
- return runStatus;
- });
- }
-}
-
-module.exports = Api;
diff --git a/node_modules/ava/cli.js b/node_modules/ava/cli.js
deleted file mode 100755
index 80151397c..000000000
--- a/node_modules/ava/cli.js
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-const debug = require('debug')('ava');
-const importLocal = require('import-local');
-
-// Prefer the local installation of AVA
-if (importLocal(__filename)) {
- debug('Using local install of AVA');
-} else {
- if (debug.enabled) {
- require('time-require'); // eslint-disable-line import/no-unassigned-import
- }
-
- try {
- require('./lib/cli').run();
- } catch (err) {
- console.error(`\n ${err.message}`);
- process.exit(1);
- }
-}
diff --git a/node_modules/ava/index.js b/node_modules/ava/index.js
deleted file mode 100644
index 536279f20..000000000
--- a/node_modules/ava/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-'use strict';
-
-// Ensure the same AVA install is loaded by the test file as by the test worker
-if (process.env.AVA_PATH && process.env.AVA_PATH !== __dirname) {
- module.exports = require(process.env.AVA_PATH);
-} else {
- module.exports = require('./lib/main');
-}
diff --git a/node_modules/ava/index.js.flow b/node_modules/ava/index.js.flow
deleted file mode 100644
index e0bda9aef..000000000
--- a/node_modules/ava/index.js.flow
+++ /dev/null
@@ -1,166 +0,0 @@
-/* @flow */
-
-/**
- * Misc Setup Types
- */
-
-type PromiseLike<R> = {
- then<U>(
- onFulfill?: (value: R) => Promise<U> | U,
- onReject?: (error: any) => Promise<U> | U
- ): Promise<U>;
-}
-
-type ObservableLike = {
- subscribe(observer: (value: {}) => void): void;
-};
-
-type SpecialReturnTypes =
- | PromiseLike<any>
- | Iterator<any>
- | ObservableLike;
-
-type Constructor = Class<{
- constructor(...args: Array<any>): any
-}>;
-
-type ErrorValidator =
- | Constructor
- | RegExp
- | string
- | ((error: any) => boolean);
-
-/**
- * Assertion Types
- */
-
-type AssertContext = {
- // Passing assertion.
- pass(message?: string): void;
- // Failing assertion.
- fail(message?: string): void;
- // Assert that value is truthy.
- truthy(value: mixed, message?: string): void;
- // Assert that value is falsy.
- falsy(value: mixed, message?: string): void;
- // Assert that value is true.
- true(value: mixed, message?: string): void;
- // Assert that value is false.
- false(value: mixed, message?: string): void;
- // Assert that value is equal to expected.
- is<U>(value: U, expected: U, message?: string): void;
- // Assert that value is not equal to expected.
- not<U>(value: U, expected: U, message?: string): void;
- // Assert that value is deep equal to expected.
- deepEqual<U>(value: U, expected: U, message?: string): void;
- // Assert that value is not deep equal to expected.
- notDeepEqual<U>(value: U, expected: U, message?: string): void;
- // Assert that function throws an error or promise rejects.
- // @param error Can be a constructor, regex, error message or validation function.
- throws: {
- (value: PromiseLike<mixed>, error?: ErrorValidator, message?: string): Promise<any>;
- (value: () => mixed, error?: ErrorValidator, message?: string): any;
- };
- // Assert that function doesn't throw an error or promise resolves.
- notThrows: {
- (value: PromiseLike<mixed>, message?: string): Promise<void>;
- (value: () => mixed, message?: string): void;
- };
- // Assert that contents matches regex.
- regex(contents: string, regex: RegExp, message?: string): void;
- // Assert that contents matches a snapshot.
- snapshot: ((contents: any, message?: string) => void) & ((contents: any, options: {id: string}, message?: string) => void);
- // Assert that contents does not match regex.
- notRegex(contents: string, regex: RegExp, message?: string): void;
- // Assert that error is falsy.
- ifError(error: any, message?: string): void;
-};
-
-/**
- * Context Types
- */
-
-type TestContext = AssertContext & {
- title: string;
- plan(count: number): void;
- skip: AssertContext;
- log(message: string): void;
-};
-type ContextualTestContext = TestContext & { context: any; };
-type ContextualCallbackTestContext = TestContext & { context: any; end(): void; };
-
-/**
- * Test Implementations
- */
-
-type TestFunction<T, R> = {
- (t: T, ...args: Array<any>): R;
- title?: (providedTitle: string, ...args: Array<any>) => string;
-};
-
-type TestImplementation<T, R> =
- | TestFunction<T, R>
- | Array<TestFunction<T, R>>;
-
-type ContextualTest = TestImplementation<ContextualTestContext, SpecialReturnTypes | void>;
-type ContextualCallbackTest = TestImplementation<ContextualCallbackTestContext, void>;
-
-
-/**
- * Method Types
- */
-
-type ContextualTestMethod = {
- ( implementation: ContextualTest): void;
- (name: string, implementation: ContextualTest): void;
-
- serial : ContextualTestMethod;
- before : ContextualTestMethod;
- after : ContextualTestMethod;
- skip : ContextualTestMethod;
- todo : ContextualTestMethod;
- failing : ContextualTestMethod;
- only : ContextualTestMethod;
- beforeEach : ContextualTestMethod;
- afterEach : ContextualTestMethod;
- cb : ContextualCallbackTestMethod;
- always : ContextualTestMethod;
-};
-
-type ContextualCallbackTestMethod = {
- ( implementation: ContextualCallbackTest): void;
- (name: string, implementation: ContextualCallbackTest): void;
-
- serial : ContextualCallbackTestMethod;
- before : ContextualCallbackTestMethod;
- after : ContextualCallbackTestMethod;
- skip : ContextualCallbackTestMethod;
- todo : ContextualCallbackTestMethod;
- failing : ContextualCallbackTestMethod;
- only : ContextualCallbackTestMethod;
- beforeEach : ContextualCallbackTestMethod;
- afterEach : ContextualCallbackTestMethod;
- cb : ContextualCallbackTestMethod;
- always : ContextualCallbackTestMethod;
-};
-
-/**
- * Public API
- */
-
-declare module.exports: {
- ( run: ContextualTest, ...args: any): void;
- (name: string, run: ContextualTest, ...args: any): void;
-
- beforeEach : ContextualTestMethod;
- afterEach : ContextualTestMethod;
- serial : ContextualTestMethod;
- before : ContextualTestMethod;
- after : ContextualTestMethod;
- skip : ContextualTestMethod;
- todo : ContextualTestMethod;
- failing : ContextualTestMethod;
- only : ContextualTestMethod;
- cb : ContextualCallbackTestMethod;
- always : ContextualTestMethod;
-};
diff --git a/node_modules/ava/lib/assert.js b/node_modules/ava/lib/assert.js
deleted file mode 100644
index 18009b97d..000000000
--- a/node_modules/ava/lib/assert.js
+++ /dev/null
@@ -1,449 +0,0 @@
-'use strict';
-const concordance = require('concordance');
-const coreAssert = require('core-assert');
-const observableToPromise = require('observable-to-promise');
-const isObservable = require('is-observable');
-const isPromise = require('is-promise');
-const concordanceOptions = require('./concordance-options').default;
-const concordanceDiffOptions = require('./concordance-options').diff;
-const enhanceAssert = require('./enhance-assert');
-const snapshotManager = require('./snapshot-manager');
-
-function formatDescriptorDiff(actualDescriptor, expectedDescriptor, options) {
- options = Object.assign({}, options, concordanceDiffOptions);
- return {
- label: 'Difference:',
- formatted: concordance.diffDescriptors(actualDescriptor, expectedDescriptor, options)
- };
-}
-
-function formatDescriptorWithLabel(label, descriptor) {
- return {
- label,
- formatted: concordance.formatDescriptor(descriptor, concordanceOptions)
- };
-}
-
-function formatWithLabel(label, value) {
- return formatDescriptorWithLabel(label, concordance.describe(value, concordanceOptions));
-}
-
-class AssertionError extends Error {
- constructor(opts) {
- super(opts.message || '');
- this.name = 'AssertionError';
-
- this.assertion = opts.assertion;
- this.fixedSource = opts.fixedSource;
- this.improperUsage = opts.improperUsage || false;
- this.operator = opts.operator;
- this.values = opts.values || [];
-
- // Raw expected and actual objects are stored for custom reporters
- // (such as wallaby.js), that manage worker processes directly and
- // use the values for custom diff views
- this.raw = opts.raw;
-
- // Reserved for power-assert statements
- this.statements = [];
-
- if (opts.stack) {
- this.stack = opts.stack;
- }
- }
-}
-exports.AssertionError = AssertionError;
-
-function getStack() {
- const obj = {};
- Error.captureStackTrace(obj, getStack);
- return obj.stack;
-}
-
-function wrapAssertions(callbacks) {
- const pass = callbacks.pass;
- const pending = callbacks.pending;
- const fail = callbacks.fail;
- const log = callbacks.log;
-
- const noop = () => {};
- const makeRethrow = reason => () => {
- throw reason;
- };
-
- const assertions = {
- pass() {
- pass(this);
- },
-
- fail(message) {
- fail(this, new AssertionError({
- assertion: 'fail',
- message: message || 'Test failed via `t.fail()`'
- }));
- },
-
- is(actual, expected, message) {
- if (Object.is(actual, expected)) {
- pass(this);
- } else {
- const result = concordance.compare(actual, expected, concordanceOptions);
- const actualDescriptor = result.actual || concordance.describe(actual, concordanceOptions);
- const expectedDescriptor = result.expected || concordance.describe(expected, concordanceOptions);
-
- if (result.pass) {
- fail(this, new AssertionError({
- assertion: 'is',
- message,
- raw: {actual, expected},
- values: [formatDescriptorWithLabel('Values are deeply equal to each other, but they are not the same:', actualDescriptor)]
- }));
- } else {
- fail(this, new AssertionError({
- assertion: 'is',
- message,
- raw: {actual, expected},
- values: [formatDescriptorDiff(actualDescriptor, expectedDescriptor)]
- }));
- }
- }
- },
-
- not(actual, expected, message) {
- if (Object.is(actual, expected)) {
- fail(this, new AssertionError({
- assertion: 'not',
- message,
- raw: {actual, expected},
- values: [formatWithLabel('Value is the same as:', actual)]
- }));
- } else {
- pass(this);
- }
- },
-
- log(text) {
- log(this, text);
- },
-
- deepEqual(actual, expected, message) {
- const result = concordance.compare(actual, expected, concordanceOptions);
- if (result.pass) {
- pass(this);
- } else {
- const actualDescriptor = result.actual || concordance.describe(actual, concordanceOptions);
- const expectedDescriptor = result.expected || concordance.describe(expected, concordanceOptions);
- fail(this, new AssertionError({
- assertion: 'deepEqual',
- message,
- raw: {actual, expected},
- values: [formatDescriptorDiff(actualDescriptor, expectedDescriptor)]
- }));
- }
- },
-
- notDeepEqual(actual, expected, message) {
- const result = concordance.compare(actual, expected, concordanceOptions);
- if (result.pass) {
- const actualDescriptor = result.actual || concordance.describe(actual, concordanceOptions);
- fail(this, new AssertionError({
- assertion: 'notDeepEqual',
- message,
- raw: {actual, expected},
- values: [formatDescriptorWithLabel('Value is deeply equal:', actualDescriptor)]
- }));
- } else {
- pass(this);
- }
- },
-
- throws(fn, err, message) {
- let promise;
- if (isPromise(fn)) {
- promise = fn;
- } else if (isObservable(fn)) {
- promise = observableToPromise(fn);
- } else if (typeof fn !== 'function') {
- fail(this, new AssertionError({
- assertion: 'throws',
- improperUsage: true,
- message: '`t.throws()` must be called with a function, Promise, or Observable',
- values: [formatWithLabel('Called with:', fn)]
- }));
- return;
- }
-
- let coreAssertThrowsErrorArg;
- if (typeof err === 'string') {
- const expectedMessage = err;
- coreAssertThrowsErrorArg = error => error.message === expectedMessage;
- } else {
- // Assume it's a constructor function or regular expression
- coreAssertThrowsErrorArg = err;
- }
-
- const test = (fn, stack) => {
- let actual;
- let threw = false;
- try {
- coreAssert.throws(() => {
- try {
- fn();
- } catch (err) {
- actual = err;
- threw = true;
- throw err;
- }
- }, coreAssertThrowsErrorArg);
- return actual;
- } catch (err) {
- throw new AssertionError({
- assertion: 'throws',
- message,
- stack,
- values: threw ?
- [formatWithLabel('Threw unexpected exception:', actual)] :
- null
- });
- }
- };
-
- if (promise) {
- // Record stack before it gets lost in the promise chain.
- const stack = getStack();
- const intermediate = promise.then(value => {
- throw new AssertionError({
- assertion: 'throws',
- message: 'Expected promise to be rejected, but it was resolved instead',
- values: [formatWithLabel('Resolved with:', value)]
- });
- }, reason => test(makeRethrow(reason), stack));
-
- pending(this, intermediate);
- // Don't reject the returned promise, even if the assertion fails.
- return intermediate.catch(noop);
- }
-
- try {
- const retval = test(fn);
- pass(this);
- return retval;
- } catch (err) {
- fail(this, err);
- }
- },
-
- notThrows(fn, message) {
- let promise;
- if (isPromise(fn)) {
- promise = fn;
- } else if (isObservable(fn)) {
- promise = observableToPromise(fn);
- } else if (typeof fn !== 'function') {
- fail(this, new AssertionError({
- assertion: 'notThrows',
- improperUsage: true,
- message: '`t.notThrows()` must be called with a function, Promise, or Observable',
- values: [formatWithLabel('Called with:', fn)]
- }));
- return;
- }
-
- const test = (fn, stack) => {
- try {
- coreAssert.doesNotThrow(fn);
- } catch (err) {
- throw new AssertionError({
- assertion: 'notThrows',
- message,
- stack,
- values: [formatWithLabel('Threw:', err.actual)]
- });
- }
- };
-
- if (promise) {
- // Record stack before it gets lost in the promise chain.
- const stack = getStack();
- const intermediate = promise.then(noop, reason => test(makeRethrow(reason), stack));
- pending(this, intermediate);
- // Don't reject the returned promise, even if the assertion fails.
- return intermediate.catch(noop);
- }
-
- try {
- test(fn);
- pass(this);
- } catch (err) {
- fail(this, err);
- }
- },
-
- ifError(actual, message) {
- if (actual) {
- fail(this, new AssertionError({
- assertion: 'ifError',
- message,
- values: [formatWithLabel('Error:', actual)]
- }));
- } else {
- pass(this);
- }
- },
-
- snapshot(expected, optionsOrMessage, message) {
- const options = {};
- if (typeof optionsOrMessage === 'string') {
- message = optionsOrMessage;
- } else if (optionsOrMessage) {
- options.id = optionsOrMessage.id;
- }
- options.expected = expected;
- options.message = message;
-
- let result;
- try {
- result = this._test.compareWithSnapshot(options);
- } catch (err) {
- if (!(err instanceof snapshotManager.SnapshotError)) {
- throw err;
- }
-
- const improperUsage = {name: err.name, snapPath: err.snapPath};
- if (err instanceof snapshotManager.VersionMismatchError) {
- improperUsage.snapVersion = err.snapVersion;
- improperUsage.expectedVersion = err.expectedVersion;
- }
-
- fail(this, new AssertionError({
- assertion: 'snapshot',
- message: message || 'Could not compare snapshot',
- improperUsage
- }));
- return;
- }
-
- if (result.pass) {
- pass(this);
- } else if (result.actual) {
- fail(this, new AssertionError({
- assertion: 'snapshot',
- message: message || 'Did not match snapshot',
- values: [formatDescriptorDiff(result.actual, result.expected, {invert: true})]
- }));
- } else {
- fail(this, new AssertionError({
- assertion: 'snapshot',
- message: message || 'No snapshot available, run with --update-snapshots'
- }));
- }
- }
- };
-
- const enhancedAssertions = enhanceAssert(pass, fail, {
- truthy(actual, message) {
- if (!actual) {
- throw new AssertionError({
- assertion: 'truthy',
- message,
- operator: '!!',
- values: [formatWithLabel('Value is not truthy:', actual)]
- });
- }
- },
-
- falsy(actual, message) {
- if (actual) {
- throw new AssertionError({
- assertion: 'falsy',
- message,
- operator: '!',
- values: [formatWithLabel('Value is not falsy:', actual)]
- });
- }
- },
-
- true(actual, message) {
- if (actual !== true) {
- throw new AssertionError({
- assertion: 'true',
- message,
- values: [formatWithLabel('Value is not `true`:', actual)]
- });
- }
- },
-
- false(actual, message) {
- if (actual !== false) {
- throw new AssertionError({
- assertion: 'false',
- message,
- values: [formatWithLabel('Value is not `false`:', actual)]
- });
- }
- },
-
- regex(string, regex, message) {
- if (typeof string !== 'string') {
- throw new AssertionError({
- assertion: 'regex',
- improperUsage: true,
- message: '`t.regex()` must be called with a string',
- values: [formatWithLabel('Called with:', string)]
- });
- }
- if (!(regex instanceof RegExp)) {
- throw new AssertionError({
- assertion: 'regex',
- improperUsage: true,
- message: '`t.regex()` must be called with a regular expression',
- values: [formatWithLabel('Called with:', regex)]
- });
- }
-
- if (!regex.test(string)) {
- throw new AssertionError({
- assertion: 'regex',
- message,
- values: [
- formatWithLabel('Value must match expression:', string),
- formatWithLabel('Regular expression:', regex)
- ]
- });
- }
- },
-
- notRegex(string, regex, message) {
- if (typeof string !== 'string') {
- throw new AssertionError({
- assertion: 'notRegex',
- improperUsage: true,
- message: '`t.notRegex()` must be called with a string',
- values: [formatWithLabel('Called with:', string)]
- });
- }
- if (!(regex instanceof RegExp)) {
- throw new AssertionError({
- assertion: 'notRegex',
- improperUsage: true,
- message: '`t.notRegex()` must be called with a regular expression',
- values: [formatWithLabel('Called with:', regex)]
- });
- }
-
- if (regex.test(string)) {
- throw new AssertionError({
- assertion: 'notRegex',
- message,
- values: [
- formatWithLabel('Value must not match expression:', string),
- formatWithLabel('Regular expression:', regex)
- ]
- });
- }
- }
- });
-
- return Object.assign(assertions, enhancedAssertions);
-}
-exports.wrapAssertions = wrapAssertions;
diff --git a/node_modules/ava/lib/ava-error.js b/node_modules/ava/lib/ava-error.js
deleted file mode 100644
index 05df6b349..000000000
--- a/node_modules/ava/lib/ava-error.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-class AvaError extends Error {
- constructor(message) {
- super(message);
- this.name = 'AvaError';
- }
-}
-
-module.exports = AvaError;
diff --git a/node_modules/ava/lib/ava-files.js b/node_modules/ava/lib/ava-files.js
deleted file mode 100644
index b6520da37..000000000
--- a/node_modules/ava/lib/ava-files.js
+++ /dev/null
@@ -1,287 +0,0 @@
-'use strict';
-const fs = require('fs');
-const path = require('path');
-const Promise = require('bluebird');
-const slash = require('slash');
-const globby = require('globby');
-const flatten = require('lodash.flatten');
-const autoBind = require('auto-bind');
-const defaultIgnore = require('ignore-by-default').directories();
-const multimatch = require('multimatch');
-
-function handlePaths(files, excludePatterns, globOptions) {
- // Convert Promise to Bluebird
- files = Promise.resolve(globby(files.concat(excludePatterns), globOptions));
-
- const searchedParents = new Set();
- const foundFiles = new Set();
-
- function alreadySearchingParent(dir) {
- if (searchedParents.has(dir)) {
- return true;
- }
-
- const parentDir = path.dirname(dir);
-
- if (parentDir === dir) {
- // We have reached the root path
- return false;
- }
-
- return alreadySearchingParent(parentDir);
- }
-
- return files
- .map(file => {
- file = path.resolve(globOptions.cwd, file);
-
- if (fs.statSync(file).isDirectory()) {
- if (alreadySearchingParent(file)) {
- return null;
- }
-
- searchedParents.add(file);
-
- let pattern = path.join(file, '**', '*.js');
-
- if (process.platform === 'win32') {
- // Always use `/` in patterns, harmonizing matching across platforms
- pattern = slash(pattern);
- }
-
- return handlePaths([pattern], excludePatterns, globOptions);
- }
-
- // `globby` returns slashes even on Windows. Normalize here so the file
- // paths are consistently platform-accurate as tests are run.
- return path.normalize(file);
- })
- .then(flatten)
- .filter(file => file && path.extname(file) === '.js')
- .filter(file => {
- if (path.basename(file)[0] === '_' && globOptions.includeUnderscoredFiles !== true) {
- return false;
- }
-
- return true;
- })
- .map(file => path.resolve(file))
- .filter(file => {
- const alreadyFound = foundFiles.has(file);
- foundFiles.add(file);
- return !alreadyFound;
- });
-}
-
-const defaultExcludePatterns = () => [
- '!**/node_modules/**',
- '!**/fixtures/**',
- '!**/helpers/**'
-];
-
-const defaultIncludePatterns = () => [
- 'test.js',
- 'test-*.js',
- 'test',
- '**/__tests__',
- '**/*.test.js'
-];
-
-const defaultHelperPatterns = () => [
- '**/__tests__/helpers/**/*.js',
- '**/__tests__/**/_*.js',
- '**/test/helpers/**/*.js',
- '**/test/**/_*.js'
-];
-
-const getDefaultIgnorePatterns = () => defaultIgnore.map(dir => `${dir}/**/*`);
-
-// Used on paths before they're passed to multimatch to harmonize matching
-// across platforms
-const matchable = process.platform === 'win32' ? slash : (path => path);
-
-class AvaFiles {
- constructor(options) {
- options = options || {};
-
- let files = (options.files || []).map(file => {
- // `./` should be removed from the beginning of patterns because
- // otherwise they won't match change events from Chokidar
- if (file.slice(0, 2) === './') {
- return file.slice(2);
- }
-
- return file;
- });
-
- if (files.length === 0) {
- files = defaultIncludePatterns();
- }
-
- this.excludePatterns = defaultExcludePatterns();
- this.files = files;
- this.sources = options.sources || [];
- this.cwd = options.cwd || process.cwd();
-
- autoBind(this);
- }
-
- findTestFiles() {
- return handlePaths(this.files, this.excludePatterns, {
- cwd: this.cwd,
- cache: Object.create(null),
- statCache: Object.create(null),
- realpathCache: Object.create(null),
- symlinks: Object.create(null)
- });
- }
-
- findTestHelpers() {
- return handlePaths(defaultHelperPatterns(), ['!**/node_modules/**'], {
- cwd: this.cwd,
- includeUnderscoredFiles: true,
- cache: Object.create(null),
- statCache: Object.create(null),
- realpathCache: Object.create(null),
- symlinks: Object.create(null)
- });
- }
-
- isSource(filePath) {
- let mixedPatterns = [];
- const defaultIgnorePatterns = getDefaultIgnorePatterns();
- const overrideDefaultIgnorePatterns = [];
-
- let hasPositivePattern = false;
- this.sources.forEach(pattern => {
- mixedPatterns.push(pattern);
-
- // TODO: Why not just `pattern[0] !== '!'`?
- if (!hasPositivePattern && pattern[0] !== '!') {
- hasPositivePattern = true;
- }
-
- // Extract patterns that start with an ignored directory. These need to be
- // rematched separately.
- if (defaultIgnore.indexOf(pattern.split('/')[0]) >= 0) {
- overrideDefaultIgnorePatterns.push(pattern);
- }
- });
-
- // Same defaults as used for Chokidar
- if (!hasPositivePattern) {
- mixedPatterns = ['package.json', '**/*.js'].concat(mixedPatterns);
- }
-
- filePath = matchable(filePath);
-
- // Ignore paths outside the current working directory.
- // They can't be matched to a pattern.
- if (/^\.\.\//.test(filePath)) {
- return false;
- }
-
- const isSource = multimatch(filePath, mixedPatterns).length === 1;
- if (!isSource) {
- return false;
- }
-
- const isIgnored = multimatch(filePath, defaultIgnorePatterns).length === 1;
- if (!isIgnored) {
- return true;
- }
-
- const isErroneouslyIgnored = multimatch(filePath, overrideDefaultIgnorePatterns).length === 1;
- if (isErroneouslyIgnored) {
- return true;
- }
-
- return false;
- }
-
- isTest(filePath) {
- const excludePatterns = this.excludePatterns;
- const initialPatterns = this.files.concat(excludePatterns);
-
- // Like in `api.js`, tests must be `.js` files and not start with `_`
- if (path.extname(filePath) !== '.js' || path.basename(filePath)[0] === '_') {
- return false;
- }
-
- // Check if the entire path matches a pattern
- if (multimatch(matchable(filePath), initialPatterns).length === 1) {
- return true;
- }
-
- // Check if the path contains any directory components
- const dirname = path.dirname(filePath);
- if (dirname === '.') {
- return false;
- }
-
- // Compute all possible subpaths. Note that the dirname is assumed to be
- // relative to the working directory, without a leading `./`.
- const subpaths = dirname.split(/[\\/]/).reduce((subpaths, component) => {
- const parent = subpaths[subpaths.length - 1];
-
- if (parent) {
- // Always use `/`` to makes multimatch consistent across platforms
- subpaths.push(`${parent}/${component}`);
- } else {
- subpaths.push(component);
- }
-
- return subpaths;
- }, []);
-
- // Check if any of the possible subpaths match a pattern. If so, generate a
- // new pattern with **/*.js.
- const recursivePatterns = subpaths
- .filter(subpath => multimatch(subpath, initialPatterns).length === 1)
- // Always use `/` to makes multimatch consistent across platforms
- .map(subpath => `${subpath}/**/*.js`);
-
- // See if the entire path matches any of the subpaths patterns, taking the
- // excludePatterns into account. This mimicks the behavior in api.js
- return multimatch(matchable(filePath), recursivePatterns.concat(excludePatterns)).length === 1;
- }
-
- getChokidarPatterns() {
- let paths = [];
- let ignored = [];
-
- this.sources.forEach(pattern => {
- if (pattern[0] === '!') {
- ignored.push(pattern.slice(1));
- } else {
- paths.push(pattern);
- }
- });
-
- // Allow source patterns to override the default ignore patterns. Chokidar
- // ignores paths that match the list of ignored patterns. It uses anymatch
- // under the hood, which supports negation patterns. For any source pattern
- // that starts with an ignored directory, ensure the corresponding negation
- // pattern is added to the ignored paths.
- const overrideDefaultIgnorePatterns = paths
- .filter(pattern => defaultIgnore.indexOf(pattern.split('/')[0]) >= 0)
- .map(pattern => `!${pattern}`);
-
- ignored = getDefaultIgnorePatterns().concat(ignored, overrideDefaultIgnorePatterns);
-
- if (paths.length === 0) {
- paths = ['package.json', '**/*.js', '**/*.snap'];
- }
-
- paths = paths.concat(this.files);
-
- return {
- paths,
- ignored
- };
- }
-}
-
-module.exports = AvaFiles;
-module.exports.defaultIncludePatterns = defaultIncludePatterns;
-module.exports.defaultExcludePatterns = defaultExcludePatterns;
diff --git a/node_modules/ava/lib/babel-config.js b/node_modules/ava/lib/babel-config.js
deleted file mode 100644
index d58b700b8..000000000
--- a/node_modules/ava/lib/babel-config.js
+++ /dev/null
@@ -1,156 +0,0 @@
-'use strict';
-const fs = require('fs');
-const path = require('path');
-const chalk = require('chalk');
-const figures = require('figures');
-const configManager = require('hullabaloo-config-manager');
-const md5Hex = require('md5-hex');
-const makeDir = require('make-dir');
-const semver = require('semver');
-const colors = require('./colors');
-
-function validate(conf) {
- if (conf === undefined || conf === null) {
- conf = 'default';
- }
-
- // Check for valid babel config shortcuts (can be either `default` or `inherit`)
- const isValidShortcut = conf === 'default' || conf === 'inherit';
-
- if (!conf || (typeof conf === 'string' && !isValidShortcut)) {
- let message = colors.error(figures.cross);
- message += ' Unexpected Babel configuration for AVA. ';
- message += 'See ' + chalk.underline('https://github.com/avajs/ava#es2017-support') + ' for allowed values.';
-
- throw new Error(message);
- }
-
- return conf;
-}
-
-const SOURCE = '(AVA) Base Babel config';
-const AVA_DIR = path.join(__dirname, '..');
-
-function verifyExistingOptions(verifierFile, baseConfig, cache) {
- return new Promise((resolve, reject) => {
- try {
- resolve(fs.readFileSync(verifierFile));
- } catch (err) {
- if (err && err.code === 'ENOENT') {
- resolve(null);
- } else {
- reject(err);
- }
- }
- })
- .then(buffer => {
- if (!buffer) {
- return null;
- }
-
- const verifier = configManager.restoreVerifier(buffer);
- const fixedSourceHashes = new Map();
- fixedSourceHashes.set(baseConfig.source, baseConfig.hash);
- if (baseConfig.extends) {
- fixedSourceHashes.set(baseConfig.extends.source, baseConfig.extends.hash);
- }
- return verifier.verifyCurrentEnv({sources: fixedSourceHashes}, cache)
- .then(result => {
- if (!result.cacheKeys) {
- return null;
- }
-
- if (result.dependenciesChanged) {
- fs.writeFileSync(verifierFile, result.verifier.toBuffer());
- }
-
- return result.cacheKeys;
- });
- });
-}
-
-function resolveOptions(baseConfig, cache, optionsFile, verifierFile) {
- return configManager.fromConfig(baseConfig, {cache})
- .then(result => {
- fs.writeFileSync(optionsFile, result.generateModule());
-
- return result.createVerifier()
- .then(verifier => {
- fs.writeFileSync(verifierFile, verifier.toBuffer());
- return verifier.cacheKeysForCurrentEnv();
- });
- });
-}
-
-function build(projectDir, cacheDir, userOptions, powerAssert) {
- // Compute a seed based on the Node.js version and the project directory.
- // Dependency hashes may vary based on the Node.js version, e.g. with the
- // @ava/stage-4 Babel preset. Sources and dependencies paths are absolute in
- // the generated module and verifier state. Those paths wouldn't necessarily
- // be valid if the project directory changes.
- const seed = md5Hex([process.versions.node, projectDir]);
-
- // Ensure cacheDir exists
- makeDir.sync(cacheDir);
-
- // The file names predict where valid options may be cached, and thus should
- // include the seed.
- const optionsFile = path.join(cacheDir, `${seed}.babel-options.js`);
- const verifierFile = path.join(cacheDir, `${seed}.verifier.bin`);
-
- const baseOptions = {
- babelrc: false,
- plugins: [],
- presets: [
- ['@ava/transform-test-files', {powerAssert}]
- ]
- };
- if (userOptions === 'default') {
- baseOptions.presets.unshift('@ava/stage-4');
- }
-
- // Include object rest spread support for node versions that support it
- // natively.
- if (userOptions === 'default' && semver.satisfies(process.versions.node, '>= 8.3.0')) {
- baseOptions.plugins.push('babel-plugin-syntax-object-rest-spread');
- }
-
- const baseConfig = configManager.createConfig({
- dir: AVA_DIR, // Presets are resolved relative to this directory
- hash: md5Hex(JSON.stringify(baseOptions)),
- json5: false,
- options: baseOptions,
- source: SOURCE
- });
-
- if (userOptions !== 'default') {
- baseConfig.extend(configManager.createConfig({
- dir: projectDir,
- options: userOptions === 'inherit' ?
- {babelrc: true} :
- userOptions,
- source: path.join(projectDir, 'package.json') + '#ava.babel',
- hash: md5Hex(JSON.stringify(userOptions))
- }));
- }
-
- const cache = configManager.prepareCache();
- return verifyExistingOptions(verifierFile, baseConfig, cache)
- .then(cacheKeys => {
- if (cacheKeys) {
- return cacheKeys;
- }
-
- return resolveOptions(baseConfig, cache, optionsFile, verifierFile);
- })
- .then(cacheKeys => ({
- getOptions: require(optionsFile).getOptions,
- // Include the seed in the cache keys used to store compilation results.
- cacheKeys: Object.assign({seed}, cacheKeys)
- }));
-}
-
-module.exports = {
- validate,
- build
-};
diff --git a/node_modules/ava/lib/beautify-stack.js b/node_modules/ava/lib/beautify-stack.js
deleted file mode 100644
index 4ae8c04be..000000000
--- a/node_modules/ava/lib/beautify-stack.js
+++ /dev/null
@@ -1,72 +0,0 @@
-'use strict';
-const StackUtils = require('stack-utils');
-const cleanStack = require('clean-stack');
-const debug = require('debug')('ava');
-
-// Ignore unimportant stack trace lines
-let ignoreStackLines = [];
-
-const avaInternals = /\/ava\/(?:lib\/)?[\w-]+\.js:\d+:\d+\)?$/;
-const avaDependencies = /\/node_modules\/(?:bluebird|empower-core|(?:ava\/node_modules\/)?(?:babel-runtime|core-js))\//;
-const stackFrameLine = /^.+( \(.+:\d+:\d+\)|:\d+:\d+)$/;
-
-if (!debug.enabled) {
- ignoreStackLines = StackUtils.nodeInternals();
- ignoreStackLines.push(avaInternals);
- ignoreStackLines.push(avaDependencies);
-}
-
-const stackUtils = new StackUtils({internals: ignoreStackLines});
-
-function extractFrames(stack) {
- return stack
- .split('\n')
- .map(line => line.trim())
- .filter(line => stackFrameLine.test(line))
- .join('\n');
-}
-
-/**
- * Given a string value of the format generated for the `stack` property of a
- * V8 error object, return a string that contains only stack frame information
- * for frames that have relevance to the consumer.
- *
- * For example, given the following string value:
- *
- * ```
- * Error
- * at inner (/home/ava/ex.js:7:12)
- * at /home/ava/ex.js:12:5
- * at outer (/home/ava/ex.js:13:4)
- * at Object.<anonymous> (/home/ava/ex.js:14:3)
- * at Module._compile (module.js:570:32)
- * at Object.Module._extensions..js (module.js:579:10)
- * at Module.load (module.js:487:32)
- * at tryModuleLoad (module.js:446:12)
- * at Function.Module._load (module.js:438:3)
- * at Module.runMain (module.js:604:10)
- * ```
- *
- * ...this function returns the following string value:
- *
- * ```
- * inner (/home/ava/ex.js:7:12)
- * /home/ava/ex.js:12:5
- * outer (/home/ava/ex.js:13:4)
- * Object.<anonymous> (/home/ava/ex.js:14:3)
- * ```
- */
-module.exports = stack => {
- if (!stack) {
- return '';
- }
-
- stack = extractFrames(stack);
- // Workaround for https://github.com/tapjs/stack-utils/issues/14
- // TODO: fix it in `stack-utils`
- stack = cleanStack(stack);
-
- return stackUtils.clean(stack)
- // Remove the trailing newline inserted by the `stack-utils` module
- .trim();
-};
diff --git a/node_modules/ava/lib/caching-precompiler.js b/node_modules/ava/lib/caching-precompiler.js
deleted file mode 100644
index f6e5e47c3..000000000
--- a/node_modules/ava/lib/caching-precompiler.js
+++ /dev/null
@@ -1,108 +0,0 @@
-'use strict';
-const path = require('path');
-const fs = require('fs');
-const convertSourceMap = require('convert-source-map');
-const cachingTransform = require('caching-transform');
-const packageHash = require('package-hash');
-const stripBomBuf = require('strip-bom-buf');
-const autoBind = require('auto-bind');
-const md5Hex = require('md5-hex');
-
-function getSourceMap(filePath, code) {
- let sourceMap = convertSourceMap.fromSource(code);
-
- if (!sourceMap) {
- const dirPath = path.dirname(filePath);
- sourceMap = convertSourceMap.fromMapFileSource(code, dirPath);
- }
-
- if (sourceMap) {
- sourceMap = sourceMap.toObject();
- }
-
- return sourceMap;
-}
-
-class CachingPrecompiler {
- constructor(options) {
- autoBind(this);
-
- this.getBabelOptions = options.getBabelOptions;
- this.babelCacheKeys = options.babelCacheKeys;
- this.cacheDirPath = options.path;
- this.fileHashes = {};
- this.transform = this._createTransform();
- }
-
- precompileFile(filePath) {
- if (!this.fileHashes[filePath]) {
- const source = stripBomBuf(fs.readFileSync(filePath));
- this.transform(source, filePath);
- }
-
- return this.fileHashes[filePath];
- }
-
- // Conditionally called by caching-transform when precompiling is required
- _init() {
- this.babel = require('babel-core');
- return this._transform;
- }
-
- _transform(code, filePath, hash) {
- code = code.toString();
-
- let result;
- const originalBabelDisableCache = process.env.BABEL_DISABLE_CACHE;
- try {
- // Disable Babel's cache. AVA has good cache management already.
- process.env.BABEL_DISABLE_CACHE = '1';
-
- result = this.babel.transform(code, Object.assign(this.getBabelOptions(), {
- inputSourceMap: getSourceMap(filePath, code),
- filename: filePath,
- sourceMaps: true,
- ast: false
- }));
- } finally {
- // Restore the original value. It is passed to workers, where users may
- // not want Babel's cache to be disabled.
- process.env.BABEL_DISABLE_CACHE = originalBabelDisableCache;
- }
-
- // Save source map
- const mapPath = path.join(this.cacheDirPath, `${hash}.js.map`);
- fs.writeFileSync(mapPath, JSON.stringify(result.map));
-
- // Append source map comment to transformed code
- // So that other libraries (like nyc) can find the source map
- const dirPath = path.dirname(filePath);
- const relativeMapPath = path.relative(dirPath, mapPath);
- const comment = convertSourceMap.generateMapFileComment(relativeMapPath);
-
- return `${result.code}\n${comment}`;
- }
-
- _createTransform() {
- const salt = packageHash.sync([
- require.resolve('../package.json'),
- require.resolve('babel-core/package.json')
- ], this.babelCacheKeys);
-
- return cachingTransform({
- factory: this._init,
- cacheDir: this.cacheDirPath,
- hash: this._generateHash,
- salt,
- ext: '.js'
- });
- }
-
- _generateHash(code, filePath, salt) {
- const hash = md5Hex([code, filePath, salt]);
- this.fileHashes[filePath] = hash;
- return hash;
- }
-}
-
-module.exports = CachingPrecompiler;
diff --git a/node_modules/ava/lib/cli.js b/node_modules/ava/lib/cli.js
deleted file mode 100644
index 0c2c2f82f..000000000
--- a/node_modules/ava/lib/cli.js
+++ /dev/null
@@ -1,210 +0,0 @@
-'use strict';
-const path = require('path');
-const updateNotifier = require('update-notifier');
-const figures = require('figures');
-const arrify = require('arrify');
-const meow = require('meow');
-const Promise = require('bluebird');
-const pkgConf = require('pkg-conf');
-const isCi = require('is-ci');
-const hasFlag = require('has-flag');
-const Api = require('../api');
-const colors = require('./colors');
-const VerboseReporter = require('./reporters/verbose');
-const MiniReporter = require('./reporters/mini');
-const TapReporter = require('./reporters/tap');
-const Logger = require('./logger');
-const Watcher = require('./watcher');
-const babelConfigHelper = require('./babel-config');
-
-// Bluebird specific
-Promise.longStackTraces();
-
-exports.run = () => {
- const conf = pkgConf.sync('ava');
-
- const filepath = pkgConf.filepath(conf);
- const projectDir = filepath === null ? process.cwd() : path.dirname(filepath);
-
- const cli = meow(`
- Usage
- ava [<file|directory|glob> ...]
-
- Options
- --init Add AVA to your project
- --fail-fast Stop after first test failure
- --serial, -s Run tests serially
- --tap, -t Generate TAP output
- --verbose, -v Enable verbose output
- --no-cache Disable the transpiler cache
- --no-power-assert Disable Power Assert
- --color Force color output
- --no-color Disable color output
- --match, -m Only run tests with matching title (Can be repeated)
- --watch, -w Re-run tests when tests and source files change
- --timeout, -T Set global timeout
- --concurrency, -c Max number of test files running at the same time (Default: CPU cores)
- --update-snapshots, -u Update snapshots
-
- Examples
- ava
- ava test.js test2.js
- ava test-*.js
- ava test
- ava --init
- ava --init foo.js
-
- Default patterns when no arguments:
- test.js test-*.js test/**/*.js **/__tests__/**/*.js **/*.test.js
- `, {
- string: [
- '_',
- 'match',
- 'timeout',
- 'concurrency'
- ],
- boolean: [
- 'init',
- 'fail-fast',
- 'serial',
- 'tap',
- 'verbose',
- 'watch',
- 'update-snapshots',
- 'color'
- ],
- default: {
- cache: conf.cache,
- color: 'color' in conf ? conf.color : require('supports-color').stdout !== false,
- concurrency: conf.concurrency,
- failFast: conf.failFast,
- init: conf.init,
- match: conf.match,
- powerAssert: conf.powerAssert,
- serial: conf.serial,
- tap: conf.tap,
- timeout: conf.timeout,
- updateSnapshots: conf.updateSnapshots,
- verbose: conf.verbose,
- watch: conf.watch
- },
- alias: {
- t: 'tap',
- v: 'verbose',
- s: 'serial',
- m: 'match',
- w: 'watch',
- T: 'timeout',
- c: 'concurrency',
- u: 'update-snapshots'
- }
- });
-
- updateNotifier({pkg: cli.pkg}).notify();
-
- if (cli.flags.init) {
- require('ava-init')();
- return;
- }
-
- if (
- ((hasFlag('--watch') || hasFlag('-w')) && (hasFlag('--tap') || hasFlag('-t'))) ||
- (conf.watch && conf.tap)
- ) {
- throw new Error(colors.error(figures.cross) + ' The TAP reporter is not available when using watch mode.');
- }
-
- if ((hasFlag('--watch') || hasFlag('-w')) && isCi) {
- throw new Error(colors.error(figures.cross) + ' Watch mode is not available in CI, as it prevents AVA from terminating.');
- }
-
- if (cli.flags.concurrency === '') {
- throw new Error(colors.error(figures.cross) + ' The --concurrency and -c flags must be provided.');
- }
-
- if (cli.flags.concurrency &&
- (!Number.isInteger(Number.parseFloat(cli.flags.concurrency)) || parseInt(cli.flags.concurrency, 10) < 0)) {
- throw new Error(colors.error(figures.cross) + ' The --concurrency and -c flags must be a nonnegative integer.');
- }
-
- if (hasFlag('--require') || hasFlag('-r')) {
- throw new Error(colors.error(figures.cross) + ' The --require and -r flags are deprecated. Requirements should be configured in package.json - see documentation.');
- }
-
- // Copy resultant cli.flags into conf for use with Api and elsewhere
- Object.assign(conf, cli.flags);
-
- const api = new Api({
- failFast: conf.failFast,
- failWithoutAssertions: conf.failWithoutAssertions !== false,
- serial: conf.serial,
- require: arrify(conf.require),
- cacheEnabled: conf.cache !== false,
- powerAssert: conf.powerAssert !== false,
- explicitTitles: conf.watch,
- match: arrify(conf.match),
- babelConfig: babelConfigHelper.validate(conf.babel),
- resolveTestsFrom: cli.input.length === 0 ? projectDir : process.cwd(),
- projectDir,
- timeout: conf.timeout,
- concurrency: conf.concurrency ? parseInt(conf.concurrency, 10) : 0,
- updateSnapshots: conf.updateSnapshots,
- snapshotDir: conf.snapshotDir ? path.resolve(projectDir, conf.snapshotDir) : null,
- color: conf.color
- });
-
- let reporter;
-
- if (conf.tap && !conf.watch) {
- reporter = new TapReporter();
- } else if (conf.verbose || isCi) {
- reporter = new VerboseReporter({color: conf.color, watching: conf.watch});
- } else {
- reporter = new MiniReporter({color: conf.color, watching: conf.watch});
- }
-
- reporter.api = api;
- const logger = new Logger(reporter);
-
- logger.start();
-
- api.on('test-run', runStatus => {
- reporter.api = runStatus;
- runStatus.on('test', logger.test);
- runStatus.on('error', logger.unhandledError);
-
- runStatus.on('stdout', logger.stdout);
- runStatus.on('stderr', logger.stderr);
- });
-
- const files = cli.input.length ? cli.input : arrify(conf.files);
-
- if (conf.watch) {
- try {
- const watcher = new Watcher(logger, api, files, arrify(conf.source));
- watcher.observeStdin(process.stdin);
- } catch (err) {
- if (err.name === 'AvaError') {
- // An AvaError may be thrown if `chokidar` is not installed. Log it nicely.
- console.error(` ${colors.error(figures.cross)} ${err.message}`);
- logger.exit(1);
- } else {
- // Rethrow so it becomes an uncaught exception
- throw err;
- }
- }
- } else {
- api.run(files)
- .then(runStatus => {
- logger.finish(runStatus);
- logger.exit(runStatus.failCount > 0 || runStatus.rejectionCount > 0 || runStatus.exceptionCount > 0 ? 1 : 0);
- })
- .catch(err => {
- // Don't swallow exceptions. Note that any expected error should already
- // have been logged.
- setImmediate(() => {
- throw err;
- });
- });
- }
-};
diff --git a/node_modules/ava/lib/code-excerpt.js b/node_modules/ava/lib/code-excerpt.js
deleted file mode 100644
index aa619a0b2..000000000
--- a/node_modules/ava/lib/code-excerpt.js
+++ /dev/null
@@ -1,57 +0,0 @@
-'use strict';
-const fs = require('fs');
-const equalLength = require('equal-length');
-const codeExcerpt = require('code-excerpt');
-const truncate = require('cli-truncate');
-const chalk = require('chalk');
-
-const formatLineNumber = (lineNumber, maxLineNumber) =>
- ' '.repeat(Math.max(0, String(maxLineNumber).length - String(lineNumber).length)) + lineNumber;
-
-module.exports = (source, options) => {
- if (!source.isWithinProject || source.isDependency) {
- return null;
- }
-
- const file = source.file;
- const line = source.line;
-
- options = options || {};
- const maxWidth = options.maxWidth || 80;
-
- let contents;
- try {
- contents = fs.readFileSync(file, 'utf8');
- } catch (err) {
- return null;
- }
-
- const excerpt = codeExcerpt(contents, line, {around: 1});
- if (!excerpt) {
- return null;
- }
-
- const lines = excerpt.map(item => ({
- line: item.line,
- value: truncate(item.value, maxWidth - String(line).length - 5)
- }));
-
- const joinedLines = lines.map(line => line.value).join('\n');
- const extendedLines = equalLength(joinedLines).split('\n');
-
- return lines
- .map((item, index) => ({
- line: item.line,
- value: extendedLines[index]
- }))
- .map(item => {
- const isErrorSource = item.line === line;
-
- const lineNumber = formatLineNumber(item.line, line) + ':';
- const coloredLineNumber = isErrorSource ? lineNumber : chalk.grey(lineNumber);
- const result = ` ${coloredLineNumber} ${item.value}`;
-
- return isErrorSource ? chalk.bgRed(result) : result;
- })
- .join('\n');
-};
diff --git a/node_modules/ava/lib/colors.js b/node_modules/ava/lib/colors.js
deleted file mode 100644
index 75fb4d8aa..000000000
--- a/node_modules/ava/lib/colors.js
+++ /dev/null
@@ -1,16 +0,0 @@
-'use strict';
-const chalk = require('chalk');
-
-module.exports = {
- log: chalk.gray,
- title: chalk.bold.white,
- error: chalk.red,
- skip: chalk.yellow,
- todo: chalk.blue,
- pass: chalk.green,
- duration: chalk.gray.dim,
- errorSource: chalk.gray,
- errorStack: chalk.gray,
- stack: chalk.red,
- information: chalk.magenta
-};
diff --git a/node_modules/ava/lib/concordance-options.js b/node_modules/ava/lib/concordance-options.js
deleted file mode 100644
index 18b4b0c77..000000000
--- a/node_modules/ava/lib/concordance-options.js
+++ /dev/null
@@ -1,130 +0,0 @@
-'use strict';
-const ansiStyles = require('ansi-styles');
-const chalk = require('chalk');
-const stripAnsi = require('strip-ansi');
-const cloneDeepWith = require('lodash.clonedeepwith');
-const reactPlugin = require('@concordance/react');
-const options = require('./globals').options;
-
-// Wrap Concordance's React plugin. Change the name to avoid collisions if in
-// the future users can register plugins themselves.
-const avaReactPlugin = Object.assign({}, reactPlugin, {name: 'ava-plugin-react'});
-const plugins = [avaReactPlugin];
-
-const forceColor = new chalk.constructor({enabled: true});
-
-const colorTheme = {
- boolean: ansiStyles.yellow,
- circular: forceColor.grey('[Circular]'),
- date: {
- invalid: forceColor.red('invalid'),
- value: ansiStyles.blue
- },
- diffGutters: {
- actual: forceColor.red('-') + ' ',
- expected: forceColor.green('+') + ' ',
- padding: ' '
- },
- error: {
- ctor: {open: ansiStyles.grey.open + '(', close: ')' + ansiStyles.grey.close},
- name: ansiStyles.magenta
- },
- function: {
- name: ansiStyles.blue,
- stringTag: ansiStyles.magenta
- },
- global: ansiStyles.magenta,
- item: {after: forceColor.grey(',')},
- list: {openBracket: forceColor.grey('['), closeBracket: forceColor.grey(']')},
- mapEntry: {after: forceColor.grey(',')},
- maxDepth: forceColor.grey('…'),
- null: ansiStyles.yellow,
- number: ansiStyles.yellow,
- object: {
- openBracket: forceColor.grey('{'),
- closeBracket: forceColor.grey('}'),
- ctor: ansiStyles.magenta,
- stringTag: {open: ansiStyles.magenta.open + '@', close: ansiStyles.magenta.close},
- secondaryStringTag: {open: ansiStyles.grey.open + '@', close: ansiStyles.grey.close}
- },
- property: {
- after: forceColor.grey(','),
- keyBracket: {open: forceColor.grey('['), close: forceColor.grey(']')},
- valueFallback: forceColor.grey('…')
- },
- react: {
- functionType: forceColor.grey('\u235F'),
- openTag: {
- start: forceColor.grey('<'),
- end: forceColor.grey('>'),
- selfClose: forceColor.grey('/'),
- selfCloseVoid: ' ' + forceColor.grey('/')
- },
- closeTag: {
- open: forceColor.grey('</'),
- close: forceColor.grey('>')
- },
- tagName: ansiStyles.magenta,
- attribute: {
- separator: '=',
- value: {
- openBracket: forceColor.grey('{'),
- closeBracket: forceColor.grey('}'),
- string: {
- line: {open: forceColor.blue('"'), close: forceColor.blue('"'), escapeQuote: '"'}
- }
- }
- },
- child: {
- openBracket: forceColor.grey('{'),
- closeBracket: forceColor.grey('}')
- }
- },
- regexp: {
- source: {open: ansiStyles.blue.open + '/', close: '/' + ansiStyles.blue.close},
- flags: ansiStyles.yellow
- },
- stats: {separator: forceColor.grey('---')},
- string: {
- open: ansiStyles.blue.open,
- close: ansiStyles.blue.close,
- line: {open: forceColor.blue('\''), close: forceColor.blue('\'')},
- multiline: {start: forceColor.blue('`'), end: forceColor.blue('`')},
- controlPicture: ansiStyles.grey,
- diff: {
- insert: {
- open: ansiStyles.bgGreen.open + ansiStyles.black.open,
- close: ansiStyles.black.close + ansiStyles.bgGreen.close
- },
- delete: {
- open: ansiStyles.bgRed.open + ansiStyles.black.open,
- close: ansiStyles.black.close + ansiStyles.bgRed.close
- },
- equal: ansiStyles.blue,
- insertLine: {
- open: ansiStyles.green.open,
- close: ansiStyles.green.close
- },
- deleteLine: {
- open: ansiStyles.red.open,
- close: ansiStyles.red.close
- }
- }
- },
- symbol: ansiStyles.yellow,
- typedArray: {
- bytes: ansiStyles.yellow
- },
- undefined: ansiStyles.yellow
-};
-
-const plainTheme = cloneDeepWith(colorTheme, value => {
- if (typeof value === 'string') {
- return stripAnsi(value);
- }
-});
-
-const theme = options.color === false ? plainTheme : colorTheme;
-exports.default = {maxDepth: 3, plugins, theme};
-exports.diff = {maxDepth: 1, plugins, theme};
-exports.snapshotManager = {plugins, theme: plainTheme};
diff --git a/node_modules/ava/lib/concurrent.js b/node_modules/ava/lib/concurrent.js
deleted file mode 100644
index 3cdbb41c3..000000000
--- a/node_modules/ava/lib/concurrent.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-class Concurrent {
- constructor(runnables, bail) {
- if (!Array.isArray(runnables)) {
- throw new TypeError('Expected an array of runnables');
- }
-
- this.runnables = runnables;
- this.bail = bail || false;
- }
-
- run() {
- let allPassed = true;
-
- let pending;
- let rejectPending;
- let resolvePending;
- const allPromises = [];
- const handlePromise = promise => {
- if (!pending) {
- pending = new Promise((resolve, reject) => {
- rejectPending = reject;
- resolvePending = resolve;
- });
- }
-
- allPromises.push(promise.then(passed => {
- if (!passed) {
- allPassed = false;
-
- if (this.bail) {
- // Stop if the test failed and bail mode is on.
- resolvePending();
- }
- }
- }, rejectPending));
- };
-
- for (const runnable of this.runnables) {
- const passedOrPromise = runnable.run();
-
- if (!passedOrPromise) {
- if (this.bail) {
- // Stop if the test failed and bail mode is on.
- return false;
- }
-
- allPassed = false;
- } else if (passedOrPromise !== true) {
- handlePromise(passedOrPromise);
- }
- }
-
- if (pending) {
- Promise.all(allPromises).then(resolvePending);
- return pending.then(() => allPassed);
- }
-
- return allPassed;
- }
-}
-
-module.exports = Concurrent;
diff --git a/node_modules/ava/lib/enhance-assert.js b/node_modules/ava/lib/enhance-assert.js
deleted file mode 100644
index 6991caf40..000000000
--- a/node_modules/ava/lib/enhance-assert.js
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict';
-const concordance = require('concordance');
-const dotProp = require('dot-prop');
-const generate = require('babel-generator').default;
-const concordanceOptions = require('./concordance-options').default;
-
-// When adding patterns, don't forget to add to
-// https://github.com/avajs/babel-preset-transform-test-files/blob/master/espower-patterns.json
-// Then release a new version of that preset and bump the SemVer range here.
-const PATTERNS = [
- 't.truthy(value, [message])',
- 't.falsy(value, [message])',
- 't.true(value, [message])',
- 't.false(value, [message])',
- 't.regex(contents, regex, [message])',
- 't.notRegex(contents, regex, [message])'
-];
-
-const computeStatement = node => generate(node, {quotes: 'single'}).code;
-const getNode = (ast, path) => dotProp.get(ast, path.replace(/\//g, '.'));
-
-const formatter = context => {
- const ast = JSON.parse(context.source.ast);
- const args = context.args[0].events;
- return args
- .map(arg => {
- const node = getNode(ast, arg.espath);
- const statement = computeStatement(node);
- const formatted = concordance.format(arg.value, concordanceOptions);
- return [statement, formatted];
- })
- .reverse();
-};
-
-const enhanceAssert = (pass, fail, assertions) => {
- const empower = require('empower-core');
- return empower(assertions, {
- destructive: true,
- onError(event) {
- const error = event.error;
- if (event.powerAssertContext) { // Context may be missing in internal tests.
- error.statements = formatter(event.powerAssertContext);
- }
- fail(this, error);
- },
- onSuccess() {
- pass(this);
- },
- patterns: PATTERNS,
- bindReceiver: false
- });
-};
-module.exports = enhanceAssert;
diff --git a/node_modules/ava/lib/fork.js b/node_modules/ava/lib/fork.js
deleted file mode 100644
index 0ca0f45a4..000000000
--- a/node_modules/ava/lib/fork.js
+++ /dev/null
@@ -1,176 +0,0 @@
-'use strict';
-const childProcess = require('child_process');
-const path = require('path');
-const fs = require('fs');
-const Promise = require('bluebird');
-const debug = require('debug')('ava');
-const AvaError = require('./ava-error');
-
-if (fs.realpathSync(__filename) !== __filename) {
- console.warn('WARNING: `npm link ava` and the `--preserve-symlink` flag are incompatible. We have detected that AVA is linked via `npm link`, and that you are using either an early version of Node 6, or the `--preserve-symlink` flag. This breaks AVA. You should upgrade to Node 6.2.0+, avoid the `--preserve-symlink` flag, or avoid using `npm link ava`.');
-}
-
-const env = Object.assign({NODE_ENV: 'test'}, process.env);
-
-// Ensure NODE_PATH paths are absolute
-if (env.NODE_PATH) {
- env.NODE_PATH = env.NODE_PATH
- .split(path.delimiter)
- .map(x => path.resolve(x))
- .join(path.delimiter);
-}
-
-// In case the test file imports a different AVA install,
-// the presence of this variable allows it to require this one instead
-env.AVA_PATH = path.resolve(__dirname, '..');
-
-module.exports = (file, opts, execArgv) => {
- opts = Object.assign({
- file,
- baseDir: process.cwd(),
- tty: process.stdout.isTTY ? {
- columns: process.stdout.columns,
- rows: process.stdout.rows
- } : false
- }, opts);
-
- const args = [JSON.stringify(opts), opts.color ? '--color' : '--no-color'];
-
- const ps = childProcess.fork(path.join(__dirname, 'test-worker.js'), args, {
- cwd: opts.projectDir,
- silent: true,
- env,
- execArgv: execArgv || process.execArgv
- });
-
- const relFile = path.relative('.', file);
-
- let exiting = false;
- const send = (name, data) => {
- if (!exiting) {
- // This seems to trigger a Node bug which kills the AVA master process, at
- // least while running AVA's tests. See
- // <https://github.com/novemberborn/_ava-tap-crash> for more details.
- ps.send({
- name: `ava-${name}`,
- data,
- ava: true
- });
- }
- };
-
- const testResults = [];
- let results;
-
- const promise = new Promise((resolve, reject) => {
- ps.on('error', reject);
-
- // Emit `test` and `stats` events
- ps.on('message', event => {
- if (!event.ava) {
- return;
- }
-
- event.name = event.name.replace(/^ava-/, '');
- event.data.file = relFile;
-
- debug('ipc %s:\n%o', event.name, event.data);
-
- ps.emit(event.name, event.data);
- });
-
- ps.on('test', props => {
- testResults.push(props);
- });
-
- ps.on('results', data => {
- results = data;
- data.tests = testResults;
- send('teardown');
- });
-
- ps.on('exit', (code, signal) => {
- if (code > 0) {
- return reject(new AvaError(`${relFile} exited with a non-zero exit code: ${code}`));
- }
-
- if (code === null && signal) {
- return reject(new AvaError(`${relFile} exited due to ${signal}`));
- }
-
- if (results) {
- resolve(results);
- } else {
- reject(new AvaError(`Test results were not received from ${relFile}`));
- }
- });
-
- ps.on('no-tests', data => {
- send('teardown');
-
- let message = `No tests found in ${relFile}`;
-
- if (!data.avaRequired) {
- message += ', make sure to import "ava" at the top of your test file';
- }
-
- reject(new AvaError(message));
- });
- });
-
- // Teardown finished, now exit
- ps.on('teardown', () => {
- send('exit');
- exiting = true;
- });
-
- // Uncaught exception in fork, need to exit
- ps.on('uncaughtException', () => {
- send('teardown');
- });
-
- ps.stdout.on('data', data => {
- ps.emit('stdout', data);
- });
-
- ps.stderr.on('data', data => {
- ps.emit('stderr', data);
- });
-
- promise.on = function () {
- ps.on.apply(ps, arguments);
- return promise;
- };
-
- promise.send = (name, data) => {
- send(name, data);
- return promise;
- };
-
- promise.exit = () => {
- send('init-exit');
- return promise;
- };
-
- // Send 'run' event only when fork is listening for it
- let isReady = false;
-
- ps.on('stats', () => {
- isReady = true;
- });
-
- promise.run = options => {
- if (isReady) {
- send('run', options);
- return promise;
- }
-
- ps.on('stats', () => {
- send('run', options);
- });
-
- return promise;
- };
-
- return promise;
-};
diff --git a/node_modules/ava/lib/globals.js b/node_modules/ava/lib/globals.js
deleted file mode 100644
index 51176c113..000000000
--- a/node_modules/ava/lib/globals.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-// Global objects / functions to be bound before requiring test file, so tests do not interfere
-
-const x = module.exports;
-x.now = Date.now;
-x.setTimeout = setTimeout;
-x.clearTimeout = clearTimeout;
-x.setImmediate = setImmediate;
-x.options = {};
diff --git a/node_modules/ava/lib/logger.js b/node_modules/ava/lib/logger.js
deleted file mode 100644
index e8edb120f..000000000
--- a/node_modules/ava/lib/logger.js
+++ /dev/null
@@ -1,92 +0,0 @@
-'use strict';
-const autoBind = require('auto-bind');
-
-class Logger {
- constructor(reporter) {
- this.reporter = reporter;
- autoBind(this);
- }
-
- start(runStatus) {
- if (!this.reporter.start) {
- return;
- }
-
- this.write(this.reporter.start(runStatus), runStatus);
- }
-
- reset(runStatus) {
- if (!this.reporter.reset) {
- return;
- }
-
- this.write(this.reporter.reset(runStatus), runStatus);
- }
-
- test(test, runStatus) {
- this.write(this.reporter.test(test, runStatus), runStatus);
- }
-
- unhandledError(err, runStatus) {
- if (!this.reporter.unhandledError) {
- return;
- }
-
- this.write(this.reporter.unhandledError(err, runStatus), runStatus);
- }
-
- finish(runStatus) {
- if (!this.reporter.finish) {
- return;
- }
-
- this.write(this.reporter.finish(runStatus), runStatus);
- }
-
- section() {
- if (!this.reporter.section) {
- return;
- }
-
- this.write(this.reporter.section());
- }
-
- clear() {
- if (!this.reporter.clear) {
- return false;
- }
-
- this.write(this.reporter.clear());
- return true;
- }
-
- write(str, runStatus) {
- if (typeof str === 'undefined') {
- return;
- }
-
- this.reporter.write(str, runStatus);
- }
-
- stdout(data, runStatus) {
- if (!this.reporter.stdout) {
- return;
- }
-
- this.reporter.stdout(data, runStatus);
- }
-
- stderr(data, runStatus) {
- if (!this.reporter.stderr) {
- return;
- }
-
- this.reporter.stderr(data, runStatus);
- }
-
- exit(code) {
- process.exit(code); // eslint-disable-line unicorn/no-process-exit
- }
-}
-
-module.exports = Logger;
diff --git a/node_modules/ava/lib/main.js b/node_modules/ava/lib/main.js
deleted file mode 100644
index 4c5fdc373..000000000
--- a/node_modules/ava/lib/main.js
+++ /dev/null
@@ -1,105 +0,0 @@
-'use strict';
-const worker = require('./test-worker');
-const adapter = require('./process-adapter');
-const serializeError = require('./serialize-error');
-const globals = require('./globals');
-const Runner = require('./runner');
-
-const opts = globals.options;
-const runner = new Runner({
- bail: opts.failFast,
- failWithoutAssertions: opts.failWithoutAssertions,
- file: opts.file,
- match: opts.match,
- projectDir: opts.projectDir,
- serial: opts.serial,
- updateSnapshots: opts.updateSnapshots,
- snapshotDir: opts.snapshotDir
-});
-
-worker.setRunner(runner);
-
-// If fail-fast is enabled, use this variable to detect
-// that no more tests should be logged
-let isFailed = false;
-
-Error.stackTraceLimit = Infinity;
-
-function test(props) {
- if (isFailed) {
- return;
- }
-
- const hasError = typeof props.error !== 'undefined';
-
- // Don't display anything if it's a passed hook
- if (!hasError && props.type !== 'test') {
- return;
- }
-
- if (hasError) {
- props.error = serializeError(props.error);
- } else {
- props.error = null;
- }
-
- adapter.send('test', props);
-
- if (hasError && opts.failFast) {
- isFailed = true;
- exit();
- }
-}
-
-function exit() {
- // Reference the IPC channel now that tests have finished running.
- adapter.ipcChannel.ref();
-
- const stats = runner.buildStats();
- adapter.send('results', {stats});
-}
-
-globals.setImmediate(() => {
- const hasExclusive = runner.tests.hasExclusive;
- const numberOfTests = runner.tests.testCount;
-
- if (numberOfTests === 0) {
- adapter.send('no-tests', {avaRequired: true});
- return;
- }
-
- adapter.send('stats', {
- testCount: numberOfTests,
- hasExclusive
- });
-
- runner.on('test', test);
-
- process.on('ava-run', options => {
- // Unreference the IPC channel. This stops it from keeping the event loop
- // busy, which means the `beforeExit` event can be used to detect when tests
- // stall.
- adapter.ipcChannel.unref();
-
- runner.run(options)
- .then(() => {
- runner.saveSnapshotState();
-
- return exit();
- })
- .catch(err => {
- process.emit('uncaughtException', err);
- });
- });
-
- process.on('ava-init-exit', () => {
- exit();
- });
-});
-
-module.exports = runner.chain;
-
-// TypeScript imports the `default` property for
-// an ES2015 default import (`import test from 'ava'`)
-// See: https://github.com/Microsoft/TypeScript/issues/2242#issuecomment-83694181
-module.exports.default = runner.chain;
diff --git a/node_modules/ava/lib/prefix-title.js b/node_modules/ava/lib/prefix-title.js
deleted file mode 100644
index a1c7b4f3b..000000000
--- a/node_modules/ava/lib/prefix-title.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-const path = require('path');
-
-module.exports = (file, base, separator) => {
- let prefix = file
- // Only replace this.base if it is found at the start of the path
- .replace(base, (match, offset) => offset === 0 ? '' : match)
- .replace(/\.spec/, '')
- .replace(/\.test/, '')
- .replace(/test-/g, '')
- .replace(/\.js$/, '')
- .split(path.sep)
- .filter(p => p !== '__tests__')
- .join(separator);
-
- if (prefix.length > 0) {
- prefix += separator;
- }
-
- return prefix;
-};
diff --git a/node_modules/ava/lib/process-adapter.js b/node_modules/ava/lib/process-adapter.js
deleted file mode 100644
index 5f9c0d79d..000000000
--- a/node_modules/ava/lib/process-adapter.js
+++ /dev/null
@@ -1,103 +0,0 @@
-'use strict';
-const fs = require('fs');
-const path = require('path');
-const debug = require('debug')('ava');
-const sourceMapSupport = require('source-map-support');
-const installPrecompiler = require('require-precompiled');
-
-// Parse and re-emit AVA messages
-process.on('message', message => {
- if (!message.ava) {
- return;
- }
-
- process.emit(message.name, message.data);
-});
-
-exports.send = (name, data) => {
- process.send({
- name: `ava-${name}`,
- data,
- ava: true
- });
-};
-
-// `process.channel` was added in Node.js 7.1.0, but the channel was available
-// through an undocumented API as `process._channel`.
-exports.ipcChannel = process.channel || process._channel;
-
-const opts = JSON.parse(process.argv[2]);
-exports.opts = opts;
-
-// Fake TTY support
-if (opts.tty) {
- process.stdout.isTTY = true;
- process.stdout.columns = opts.tty.columns || 80;
- process.stdout.rows = opts.tty.rows;
-
- const tty = require('tty');
- const isatty = tty.isatty;
-
- tty.isatty = function (fd) {
- if (fd === 1 || fd === process.stdout) {
- return true;
- }
-
- return isatty(fd);
- };
-}
-
-if (debug.enabled) {
- // Forward the `time-require` `--sorted` flag.
- // Intended for internal optimization tests only.
- if (opts._sorted) {
- process.argv.push('--sorted');
- }
-
- require('time-require'); // eslint-disable-line import/no-unassigned-import
-}
-
-const sourceMapCache = new Map();
-const cacheDir = opts.cacheDir;
-
-exports.installSourceMapSupport = () => {
- sourceMapSupport.install({
- environment: 'node',
- handleUncaughtExceptions: false,
- retrieveSourceMap(source) {
- if (sourceMapCache.has(source)) {
- return {
- url: source,
- map: fs.readFileSync(sourceMapCache.get(source), 'utf8')
- };
- }
- }
- });
-};
-
-exports.installPrecompilerHook = () => {
- installPrecompiler(filename => {
- const precompiled = opts.precompiled[filename];
-
- if (precompiled) {
- sourceMapCache.set(filename, path.join(cacheDir, `${precompiled}.js.map`));
- return fs.readFileSync(path.join(cacheDir, `${precompiled}.js`), 'utf8');
- }
-
- return null;
- });
-};
-
-exports.installDependencyTracking = (dependencies, testPath) => {
- Object.keys(require.extensions).forEach(ext => {
- const wrappedHandler = require.extensions[ext];
-
- require.extensions[ext] = (module, filename) => {
- if (filename !== testPath) {
- dependencies.add(filename);
- }
-
- wrappedHandler(module, filename);
- };
- });
-};
diff --git a/node_modules/ava/lib/reporters/format-serialized-error.js b/node_modules/ava/lib/reporters/format-serialized-error.js
deleted file mode 100644
index 6ab59e47c..000000000
--- a/node_modules/ava/lib/reporters/format-serialized-error.js
+++ /dev/null
@@ -1,26 +0,0 @@
-'use strict';
-const chalk = require('chalk');
-const trimOffNewlines = require('trim-off-newlines');
-
-function formatSerializedError(error) {
- const printMessage = error.values.length === 0 ?
- Boolean(error.message) :
- !error.values[0].label.startsWith(error.message);
-
- if (error.statements.length === 0 && error.values.length === 0) {
- return {formatted: null, printMessage};
- }
-
- let formatted = '';
- for (const value of error.values) {
- formatted += `${value.label}\n\n${trimOffNewlines(value.formatted)}\n\n`;
- }
-
- for (const statement of error.statements) {
- formatted += `${statement[0]}\n${chalk.grey('=>')} ${trimOffNewlines(statement[1])}\n\n`;
- }
-
- formatted = trimOffNewlines(formatted);
- return {formatted, printMessage};
-}
-module.exports = formatSerializedError;
diff --git a/node_modules/ava/lib/reporters/improper-usage-messages.js b/node_modules/ava/lib/reporters/improper-usage-messages.js
deleted file mode 100644
index 014a4bf0d..000000000
--- a/node_modules/ava/lib/reporters/improper-usage-messages.js
+++ /dev/null
@@ -1,56 +0,0 @@
-'use strict';
-const chalk = require('chalk');
-
-exports.forError = error => {
- if (!error.improperUsage) {
- return null;
- }
-
- const assertion = error.assertion;
- if (assertion === 'throws' || assertion === 'notThrows') {
- return `Try wrapping the first argument to \`t.${assertion}()\` in a function:
-
- ${chalk.cyan(`t.${assertion}(() => { `)}${chalk.grey('/* your code here */')}${chalk.cyan(' })')}
-
-Visit the following URL for more details:
-
- ${chalk.blue.underline('https://github.com/avajs/ava#throwsfunctionpromise-error-message')}`;
- }
-
- if (assertion === 'snapshot') {
- const name = error.improperUsage.name;
- const snapPath = error.improperUsage.snapPath;
-
- if (name === 'ChecksumError') {
- return `The snapshot file is corrupted.
-
-File path: ${chalk.yellow(snapPath)}
-
-Please run AVA again with the ${chalk.cyan('--update-snapshots')} flag to recreate it.`;
- }
-
- if (name === 'LegacyError') {
- return `The snapshot file was created with AVA 0.19. It's not supported by this AVA version.
-
-File path: ${chalk.yellow(snapPath)}
-
-Please run AVA again with the ${chalk.cyan('--update-snapshots')} flag to upgrade.`;
- }
-
- if (name === 'VersionMismatchError') {
- const snapVersion = error.improperUsage.snapVersion;
- const expectedVersion = error.improperUsage.expectedVersion;
- const upgradeMessage = snapVersion < expectedVersion ?
- `Please run AVA again with the ${chalk.cyan('--update-snapshots')} flag to upgrade.` :
- 'You should upgrade AVA.';
-
- return `The snapshot file is v${snapVersion}, but only v${expectedVersion} is supported.
-
-File path: ${chalk.yellow(snapPath)}
-
-${upgradeMessage}`;
- }
- }
-
- return null;
-};
diff --git a/node_modules/ava/lib/reporters/mini.js b/node_modules/ava/lib/reporters/mini.js
deleted file mode 100644
index a21d02a6b..000000000
--- a/node_modules/ava/lib/reporters/mini.js
+++ /dev/null
@@ -1,333 +0,0 @@
-'use strict';
-const StringDecoder = require('string_decoder').StringDecoder;
-const cliCursor = require('cli-cursor');
-const lastLineTracker = require('last-line-stream/tracker');
-const plur = require('plur');
-const spinners = require('cli-spinners');
-const chalk = require('chalk');
-const figures = require('figures');
-const cliTruncate = require('cli-truncate');
-const cross = require('figures').cross;
-const indentString = require('indent-string');
-const ansiEscapes = require('ansi-escapes');
-const trimOffNewlines = require('trim-off-newlines');
-const codeExcerpt = require('../code-excerpt');
-const colors = require('../colors');
-const formatSerializedError = require('./format-serialized-error');
-const improperUsageMessages = require('./improper-usage-messages');
-
-class MiniReporter {
- constructor(options) {
- this.options = Object.assign({}, options);
-
- chalk.enabled = this.options.color;
- for (const key of Object.keys(colors)) {
- colors[key].enabled = this.options.color;
- }
-
- const spinnerDef = spinners[process.platform === 'win32' ? 'line' : 'dots'];
- this.spinnerFrames = spinnerDef.frames.map(c => chalk.gray.dim(c));
- this.spinnerInterval = spinnerDef.interval;
-
- this.reset();
- this.stream = process.stderr;
- this.stringDecoder = new StringDecoder();
- }
-
- start() {
- this.interval = setInterval(() => {
- this.spinnerIndex = (this.spinnerIndex + 1) % this.spinnerFrames.length;
- this.write(this.prefix());
- }, this.spinnerInterval);
-
- return this.prefix('');
- }
-
- reset() {
- this.clearInterval();
- this.passCount = 0;
- this.knownFailureCount = 0;
- this.failCount = 0;
- this.skipCount = 0;
- this.todoCount = 0;
- this.rejectionCount = 0;
- this.exceptionCount = 0;
- this.currentStatus = '';
- this.currentTest = '';
- this.statusLineCount = 0;
- this.spinnerIndex = 0;
- this.lastLineTracker = lastLineTracker();
- }
-
- spinnerChar() {
- return this.spinnerFrames[this.spinnerIndex];
- }
-
- clearInterval() {
- clearInterval(this.interval);
- this.interval = null;
- }
-
- test(test) {
- if (test.todo) {
- this.todoCount++;
- } else if (test.skip) {
- this.skipCount++;
- } else if (test.error) {
- this.failCount++;
- } else {
- this.passCount++;
- if (test.failing) {
- this.knownFailureCount++;
- }
- }
-
- if (test.todo || test.skip) {
- return;
- }
-
- return this.prefix(this._test(test));
- }
-
- prefix(str) {
- str = str || this.currentTest;
- this.currentTest = str;
-
- // The space before the newline is required for proper formatting
- // TODO(jamestalmage): Figure out why it's needed and document it here
- return ` \n ${this.spinnerChar()} ${str}`;
- }
-
- _test(test) {
- const SPINNER_WIDTH = 3;
- const PADDING = 1;
- let title = cliTruncate(test.title, process.stdout.columns - SPINNER_WIDTH - PADDING);
-
- if (test.error || test.failing) {
- title = colors.error(test.title);
- }
-
- return title + '\n' + this.reportCounts();
- }
-
- unhandledError(err) {
- if (err.type === 'exception') {
- this.exceptionCount++;
- } else {
- this.rejectionCount++;
- }
- }
-
- reportCounts(time) {
- const lines = [
- this.passCount > 0 ? '\n ' + colors.pass(this.passCount, 'passed') : '',
- this.knownFailureCount > 0 ? '\n ' + colors.error(this.knownFailureCount, plur('known failure', this.knownFailureCount)) : '',
- this.failCount > 0 ? '\n ' + colors.error(this.failCount, 'failed') : '',
- this.skipCount > 0 ? '\n ' + colors.skip(this.skipCount, 'skipped') : '',
- this.todoCount > 0 ? '\n ' + colors.todo(this.todoCount, 'todo') : ''
- ].filter(Boolean);
-
- if (time && lines.length > 0) {
- lines[0] += ' ' + time;
- }
-
- return lines.join('');
- }
-
- finish(runStatus) {
- this.clearInterval();
- let time;
-
- if (this.options.watching) {
- time = chalk.gray.dim('[' + new Date().toLocaleTimeString('en-US', {hour12: false}) + ']');
- }
-
- let status = this.reportCounts(time) + '\n';
-
- if (this.rejectionCount > 0) {
- status += ' ' + colors.error(this.rejectionCount, plur('rejection', this.rejectionCount)) + '\n';
- }
-
- if (this.exceptionCount > 0) {
- status += ' ' + colors.error(this.exceptionCount, plur('exception', this.exceptionCount)) + '\n';
- }
-
- if (runStatus.previousFailCount > 0) {
- status += ' ' + colors.error(runStatus.previousFailCount, 'previous', plur('failure', runStatus.previousFailCount), 'in test files that were not rerun') + '\n';
- }
-
- if (this.knownFailureCount > 0) {
- for (const test of runStatus.knownFailures) {
- const title = test.title;
- status += '\n ' + colors.title(title) + '\n';
- // TODO: Output description with link
- // status += colors.stack(description);
- }
- }
-
- status += '\n';
- if (this.failCount > 0) {
- runStatus.errors.forEach(test => {
- if (!test.error) {
- return;
- }
-
- status += ' ' + colors.title(test.title) + '\n';
-
- if (test.logs) {
- test.logs.forEach(log => {
- const logLines = indentString(colors.log(log), 6);
- const logLinesWithLeadingFigure = logLines.replace(
- /^ {6}/,
- ` ${colors.information(figures.info)} `
- );
-
- status += logLinesWithLeadingFigure + '\n';
- });
-
- status += '\n';
- }
-
- if (test.error.source) {
- status += ' ' + colors.errorSource(test.error.source.file + ':' + test.error.source.line) + '\n';
-
- const excerpt = codeExcerpt(test.error.source, {maxWidth: process.stdout.columns});
- if (excerpt) {
- status += '\n' + indentString(excerpt, 2) + '\n';
- }
- }
-
- if (test.error.avaAssertionError) {
- const result = formatSerializedError(test.error);
- if (result.printMessage) {
- status += '\n' + indentString(test.error.message, 2) + '\n';
- }
-
- if (result.formatted) {
- status += '\n' + indentString(result.formatted, 2) + '\n';
- }
-
- const message = improperUsageMessages.forError(test.error);
- if (message) {
- status += '\n' + indentString(message, 2) + '\n';
- }
- } else if (test.error.message) {
- status += '\n' + indentString(test.error.message, 2) + '\n';
- }
-
- if (test.error.stack) {
- const stack = test.error.stack;
- if (stack.includes('\n')) {
- status += '\n' + indentString(colors.errorStack(stack), 2) + '\n';
- }
- }
-
- status += '\n\n\n';
- });
- }
-
- if (this.rejectionCount > 0 || this.exceptionCount > 0) {
- // TODO(sindresorhus): Figure out why this causes a test failure when switched to a for-of loop
- runStatus.errors.forEach(err => {
- if (err.title) {
- return;
- }
-
- if (err.type === 'exception' && err.name === 'AvaError') {
- status += ' ' + colors.error(cross + ' ' + err.message) + '\n\n';
- } else {
- const title = err.type === 'rejection' ? 'Unhandled Rejection' : 'Uncaught Exception';
- status += ' ' + colors.title(title) + '\n';
-
- if (err.name) {
- status += ' ' + colors.stack(err.summary) + '\n';
- status += colors.errorStack(err.stack) + '\n\n';
- } else {
- status += ' Threw non-error: ' + err.summary + '\n';
- }
- }
- });
- }
-
- if (runStatus.failFastEnabled === true && runStatus.remainingCount > 0 && runStatus.failCount > 0) {
- const remaining = 'At least ' + runStatus.remainingCount + ' ' + plur('test was', 'tests were', runStatus.remainingCount) + ' skipped.';
- status += ' ' + colors.information('`--fail-fast` is on. ' + remaining) + '\n\n';
- }
-
- if (runStatus.hasExclusive === true && runStatus.remainingCount > 0) {
- status += ' ' + colors.information('The .only() modifier is used in some tests.', runStatus.remainingCount, plur('test', runStatus.remainingCount), plur('was', 'were', runStatus.remainingCount), 'not run');
- }
-
- return '\n' + trimOffNewlines(status) + '\n';
- }
-
- section() {
- return '\n' + chalk.gray.dim('\u2500'.repeat(process.stdout.columns || 80));
- }
-
- clear() {
- return '';
- }
-
- write(str) {
- cliCursor.hide();
- this.currentStatus = str;
- this._update();
- this.statusLineCount = this.currentStatus.split('\n').length;
- }
-
- stdout(data) {
- this._update(data);
- }
-
- stderr(data) {
- this._update(data);
- }
-
- _update(data) {
- let str = '';
- let ct = this.statusLineCount;
- const columns = process.stdout.columns;
- let lastLine = this.lastLineTracker.lastLine();
-
- // Terminals automatically wrap text. We only need the last log line as seen on the screen.
- lastLine = lastLine.substring(lastLine.length - (lastLine.length % columns));
-
- // Don't delete the last log line if it's completely empty.
- if (lastLine.length > 0) {
- ct++;
- }
-
- // Erase the existing status message, plus the last log line.
- str += ansiEscapes.eraseLines(ct);
-
- // Rewrite the last log line.
- str += lastLine;
-
- if (str.length > 0) {
- this.stream.write(str);
- }
-
- if (data) {
- // Send new log data to the terminal, and update the last line status.
- this.lastLineTracker.update(this.stringDecoder.write(data));
- this.stream.write(data);
- }
-
- let currentStatus = this.currentStatus;
-
- if (currentStatus.length > 0) {
- lastLine = this.lastLineTracker.lastLine();
- // We need a newline at the end of the last log line, before the status message.
- // However, if the last log line is the exact width of the terminal a newline is implied,
- // and adding a second will cause problems.
- if (lastLine.length % columns) {
- currentStatus = '\n' + currentStatus;
- }
- // Rewrite the status message.
- this.stream.write(currentStatus);
- }
- }
-}
-
-module.exports = MiniReporter;
diff --git a/node_modules/ava/lib/reporters/tap.js b/node_modules/ava/lib/reporters/tap.js
deleted file mode 100644
index 5ef8a23e3..000000000
--- a/node_modules/ava/lib/reporters/tap.js
+++ /dev/null
@@ -1,132 +0,0 @@
-'use strict';
-const format = require('util').format;
-const indentString = require('indent-string');
-const stripAnsi = require('strip-ansi');
-const yaml = require('js-yaml');
-
-function dumpError(error, includeMessage) {
- const obj = Object.assign({}, error.object);
- if (error.name) {
- obj.name = error.name;
- }
- if (includeMessage && error.message) {
- obj.message = error.message;
- }
-
- if (error.avaAssertionError) {
- if (error.assertion) {
- obj.assertion = error.assertion;
- }
- if (error.operator) {
- obj.operator = error.operator;
- }
- if (error.values.length > 0) {
- obj.values = error.values.reduce((acc, value) => {
- acc[value.label] = stripAnsi(value.formatted);
- return acc;
- }, {});
- }
- }
-
- if (error.stack) {
- obj.at = error.stack.split('\n')[0];
- }
-
- return ` ---\n${indentString(yaml.safeDump(obj).trim(), 4)}\n ...`;
-}
-
-class TapReporter {
- constructor() {
- this.i = 0;
- }
-
- start() {
- return 'TAP version 13';
- }
-
- test(test) {
- const output = [];
-
- let directive = '';
- const passed = test.todo ? 'not ok' : 'ok';
-
- if (test.todo) {
- directive = '# TODO';
- } else if (test.skip) {
- directive = '# SKIP';
- }
-
- const title = stripAnsi(test.title);
-
- const appendLogs = () => {
- if (test.logs) {
- test.logs.forEach(log => {
- const logLines = indentString(log, 4);
- const logLinesWithLeadingFigure = logLines.replace(
- /^ {4}/,
- ' * '
- );
-
- output.push(logLinesWithLeadingFigure);
- });
- }
- };
-
- output.push(`# ${title}`);
-
- if (test.error) {
- output.push(format('not ok %d - %s', ++this.i, title));
- appendLogs();
- output.push(dumpError(test.error, true));
- } else {
- output.push(format('%s %d - %s %s', passed, ++this.i, title, directive).trim());
- appendLogs();
- }
-
- return output.join('\n');
- }
-
- unhandledError(err) {
- const output = [
- `# ${err.message}`,
- format('not ok %d - %s', ++this.i, err.message)
- ];
- // AvaErrors don't have stack traces
- if (err.type !== 'exception' || err.name !== 'AvaError') {
- output.push(dumpError(err, false));
- }
-
- return output.join('\n');
- }
-
- finish(runStatus) {
- const output = [
- '',
- '1..' + (runStatus.passCount + runStatus.failCount + runStatus.skipCount),
- '# tests ' + (runStatus.passCount + runStatus.failCount + runStatus.skipCount),
- '# pass ' + runStatus.passCount
- ];
-
- if (runStatus.skipCount > 0) {
- output.push(`# skip ${runStatus.skipCount}`);
- }
-
- output.push('# fail ' + (runStatus.failCount + runStatus.rejectionCount + runStatus.exceptionCount), '');
-
- return output.join('\n');
- }
-
- write(str) {
- console.log(str);
- }
-
- stdout(data) {
- process.stderr.write(data);
- }
-
- stderr(data) {
- this.stdout(data);
- }
-}
-
-module.exports = TapReporter;
diff --git a/node_modules/ava/lib/reporters/verbose.js b/node_modules/ava/lib/reporters/verbose.js
deleted file mode 100644
index c58d8db3b..000000000
--- a/node_modules/ava/lib/reporters/verbose.js
+++ /dev/null
@@ -1,204 +0,0 @@
-'use strict';
-const indentString = require('indent-string');
-const prettyMs = require('pretty-ms');
-const figures = require('figures');
-const chalk = require('chalk');
-const plur = require('plur');
-const trimOffNewlines = require('trim-off-newlines');
-const codeExcerpt = require('../code-excerpt');
-const colors = require('../colors');
-const formatSerializedError = require('./format-serialized-error');
-const improperUsageMessages = require('./improper-usage-messages');
-
-class VerboseReporter {
- constructor(options) {
- this.options = Object.assign({}, options);
-
- chalk.enabled = this.options.color;
- for (const key of Object.keys(colors)) {
- colors[key].enabled = this.options.color;
- }
- }
-
- start() {
- return '';
- }
-
- test(test, runStatus) {
- const lines = [];
- if (test.error) {
- lines.push(' ' + colors.error(figures.cross) + ' ' + test.title + ' ' + colors.error(test.error.message));
- } else if (test.todo) {
- lines.push(' ' + colors.todo('- ' + test.title));
- } else if (test.skip) {
- lines.push(' ' + colors.skip('- ' + test.title));
- } else if (test.failing) {
- lines.push(' ' + colors.error(figures.tick) + ' ' + colors.error(test.title));
- } else if (runStatus.fileCount === 1 && runStatus.testCount === 1 && test.title === '[anonymous]') {
- // No output
- } else {
- // Display duration only over a threshold
- const threshold = 100;
- const duration = test.duration > threshold ? colors.duration(' (' + prettyMs(test.duration) + ')') : '';
-
- lines.push(' ' + colors.pass(figures.tick) + ' ' + test.title + duration);
- }
-
- if (test.logs) {
- test.logs.forEach(log => {
- const logLines = indentString(colors.log(log), 6);
- const logLinesWithLeadingFigure = logLines.replace(
- /^ {6}/,
- ` ${colors.information(figures.info)} `
- );
-
- lines.push(logLinesWithLeadingFigure);
- });
- }
-
- return lines.length > 0 ? lines.join('\n') : undefined;
- }
-
- unhandledError(err) {
- if (err.type === 'exception' && err.name === 'AvaError') {
- return colors.error(' ' + figures.cross + ' ' + err.message);
- }
-
- const types = {
- rejection: 'Unhandled Rejection',
- exception: 'Uncaught Exception'
- };
-
- let output = colors.error(types[err.type] + ':', err.file) + '\n';
-
- if (err.stack) {
- output += ' ' + colors.stack(err.title || err.summary) + '\n';
- output += ' ' + colors.stack(err.stack) + '\n';
- } else {
- output += ' ' + colors.stack(JSON.stringify(err)) + '\n';
- }
-
- output += '\n';
-
- return output;
- }
-
- finish(runStatus) {
- let output = '';
-
- const lines = [
- runStatus.failCount > 0 ?
- ' ' + colors.error(runStatus.failCount, plur('test', runStatus.failCount), 'failed') :
- ' ' + colors.pass(runStatus.passCount, plur('test', runStatus.passCount), 'passed'),
- runStatus.knownFailureCount > 0 ? ' ' + colors.error(runStatus.knownFailureCount, plur('known failure', runStatus.knownFailureCount)) : '',
- runStatus.skipCount > 0 ? ' ' + colors.skip(runStatus.skipCount, plur('test', runStatus.skipCount), 'skipped') : '',
- runStatus.todoCount > 0 ? ' ' + colors.todo(runStatus.todoCount, plur('test', runStatus.todoCount), 'todo') : '',
- runStatus.rejectionCount > 0 ? ' ' + colors.error(runStatus.rejectionCount, 'unhandled', plur('rejection', runStatus.rejectionCount)) : '',
- runStatus.exceptionCount > 0 ? ' ' + colors.error(runStatus.exceptionCount, 'uncaught', plur('exception', runStatus.exceptionCount)) : '',
- runStatus.previousFailCount > 0 ? ' ' + colors.error(runStatus.previousFailCount, 'previous', plur('failure', runStatus.previousFailCount), 'in test files that were not rerun') : ''
- ].filter(Boolean);
-
- if (lines.length > 0) {
- if (this.options.watching) {
- lines[0] += ' ' + chalk.gray.dim('[' + new Date().toLocaleTimeString('en-US', {hour12: false}) + ']');
- }
- output += lines.join('\n') + '\n';
- }
-
- if (runStatus.knownFailureCount > 0) {
- runStatus.knownFailures.forEach(test => {
- output += '\n\n ' + colors.error(test.title) + '\n';
- });
- }
-
- output += '\n';
- if (runStatus.failCount > 0) {
- runStatus.tests.forEach(test => {
- if (!test.error) {
- return;
- }
-
- output += ' ' + colors.title(test.title) + '\n';
-
- if (test.logs) {
- test.logs.forEach(log => {
- const logLines = indentString(colors.log(log), 6);
- const logLinesWithLeadingFigure = logLines.replace(
- /^ {6}/,
- ` ${colors.information(figures.info)} `
- );
-
- output += logLinesWithLeadingFigure + '\n';
- });
-
- output += '\n';
- }
-
- if (test.error.source) {
- output += ' ' + colors.errorSource(test.error.source.file + ':' + test.error.source.line) + '\n';
-
- const excerpt = codeExcerpt(test.error.source, {maxWidth: process.stdout.columns});
- if (excerpt) {
- output += '\n' + indentString(excerpt, 2) + '\n';
- }
- }
-
- if (test.error.avaAssertionError) {
- const result = formatSerializedError(test.error);
- if (result.printMessage) {
- output += '\n' + indentString(test.error.message, 2) + '\n';
- }
-
- if (result.formatted) {
- output += '\n' + indentString(result.formatted, 2) + '\n';
- }
-
- const message = improperUsageMessages.forError(test.error);
- if (message) {
- output += '\n' + indentString(message, 2) + '\n';
- }
- } else if (test.error.message) {
- output += '\n' + indentString(test.error.message, 2) + '\n';
- }
-
- if (test.error.stack) {
- const stack = test.error.stack;
- if (stack.includes('\n')) {
- output += '\n' + indentString(colors.errorStack(stack), 2) + '\n';
- }
- }
-
- output += '\n\n\n';
- });
- }
-
- if (runStatus.failFastEnabled === true && runStatus.remainingCount > 0 && runStatus.failCount > 0) {
- const remaining = 'At least ' + runStatus.remainingCount + ' ' + plur('test was', 'tests were', runStatus.remainingCount) + ' skipped.';
- output += ' ' + colors.information('`--fail-fast` is on. ' + remaining) + '\n\n';
- }
-
- if (runStatus.hasExclusive === true && runStatus.remainingCount > 0) {
- output += ' ' + colors.information('The .only() modifier is used in some tests.', runStatus.remainingCount, plur('test', runStatus.remainingCount), plur('was', 'were', runStatus.remainingCount), 'not run');
- }
-
- return '\n' + trimOffNewlines(output) + '\n';
- }
-
- section() {
- return chalk.gray.dim('\u2500'.repeat(process.stdout.columns || 80));
- }
-
- write(str) {
- console.error(str);
- }
-
- stdout(data) {
- process.stderr.write(data);
- }
-
- stderr(data) {
- process.stderr.write(data);
- }
-}
-
-module.exports = VerboseReporter;
diff --git a/node_modules/ava/lib/run-status.js b/node_modules/ava/lib/run-status.js
deleted file mode 100644
index 461ab8f90..000000000
--- a/node_modules/ava/lib/run-status.js
+++ /dev/null
@@ -1,136 +0,0 @@
-'use strict';
-const EventEmitter = require('events');
-const chalk = require('chalk');
-const flatten = require('arr-flatten');
-const figures = require('figures');
-const autoBind = require('auto-bind');
-const prefixTitle = require('./prefix-title');
-
-function sum(arr, key) {
- let result = 0;
-
- arr.forEach(item => {
- result += item[key];
- });
-
- return result;
-}
-
-class RunStatus extends EventEmitter {
- constructor(opts) {
- super();
-
- opts = opts || {};
- this.prefixTitles = opts.prefixTitles !== false;
- this.hasExclusive = Boolean(opts.runOnlyExclusive);
- this.base = opts.base || '';
- this.rejectionCount = 0;
- this.exceptionCount = 0;
- this.passCount = 0;
- this.knownFailureCount = 0;
- this.skipCount = 0;
- this.todoCount = 0;
- this.failCount = 0;
- this.fileCount = 0;
- this.testCount = 0;
- this.remainingCount = 0;
- this.previousFailCount = 0;
- this.knownFailures = [];
- this.errors = [];
- this.stats = [];
- this.tests = [];
- this.failFastEnabled = opts.failFast || false;
- this.updateSnapshots = opts.updateSnapshots || false;
-
- autoBind(this);
- }
-
- observeFork(emitter) {
- emitter
- .on('teardown', this.handleTeardown)
- .on('stats', this.handleStats)
- .on('test', this.handleTest)
- .on('unhandledRejections', this.handleRejections)
- .on('uncaughtException', this.handleExceptions)
- .on('stdout', this.handleOutput.bind(this, 'stdout'))
- .on('stderr', this.handleOutput.bind(this, 'stderr'));
- }
-
- handleRejections(data) {
- this.rejectionCount += data.rejections.length;
-
- data.rejections.forEach(err => {
- err.type = 'rejection';
- err.file = data.file;
- this.emit('error', err, this);
- this.errors.push(err);
- });
- }
-
- handleExceptions(data) {
- this.exceptionCount++;
- const err = data.exception;
- err.type = 'exception';
- err.file = data.file;
- this.emit('error', err, this);
- this.errors.push(err);
- }
-
- handleTeardown(data) {
- this.emit('dependencies', data.file, data.dependencies, this);
- this.emit('touchedFiles', data.touchedFiles);
- }
-
- handleStats(stats) {
- this.emit('stats', stats, this);
-
- if (stats.hasExclusive) {
- this.hasExclusive = true;
- }
-
- this.testCount += stats.testCount;
- }
-
- handleTest(test) {
- test.title = this.prefixTitle(test.file) + test.title;
-
- if (test.error) {
- this.errors.push(test);
- }
-
- if (test.failing && !test.error) {
- this.knownFailures.push(test);
- }
-
- this.emit('test', test, this);
- }
-
- prefixTitle(file) {
- if (!this.prefixTitles) {
- return '';
- }
-
- const separator = ' ' + chalk.gray.dim(figures.pointerSmall) + ' ';
-
- return prefixTitle(file, this.base, separator);
- }
-
- handleOutput(channel, data) {
- this.emit(channel, data, this);
- }
-
- processResults(results) {
- // Assemble stats from all tests
- this.stats = results.map(result => result.stats);
- this.tests = results.map(result => result.tests);
- this.tests = flatten(this.tests);
- this.passCount = sum(this.stats, 'passCount');
- this.knownFailureCount = sum(this.stats, 'knownFailureCount');
- this.skipCount = sum(this.stats, 'skipCount');
- this.todoCount = sum(this.stats, 'todoCount');
- this.failCount = sum(this.stats, 'failCount');
- this.remainingCount = this.testCount - this.passCount - this.failCount - this.skipCount - this.todoCount - this.knownFailureCount;
- }
-}
-
-module.exports = RunStatus;
diff --git a/node_modules/ava/lib/runner.js b/node_modules/ava/lib/runner.js
deleted file mode 100644
index eb02dde45..000000000
--- a/node_modules/ava/lib/runner.js
+++ /dev/null
@@ -1,232 +0,0 @@
-'use strict';
-const EventEmitter = require('events');
-const path = require('path');
-const Bluebird = require('bluebird');
-const optionChain = require('option-chain');
-const matcher = require('matcher');
-const snapshotManager = require('./snapshot-manager');
-const TestCollection = require('./test-collection');
-const validateTest = require('./validate-test');
-
-const chainableMethods = {
- defaults: {
- type: 'test',
- serial: false,
- exclusive: false,
- skipped: false,
- todo: false,
- failing: false,
- callback: false,
- always: false
- },
- chainableMethods: {
- test: {},
- serial: {serial: true},
- before: {type: 'before'},
- after: {type: 'after'},
- skip: {skipped: true},
- todo: {todo: true},
- failing: {failing: true},
- only: {exclusive: true},
- beforeEach: {type: 'beforeEach'},
- afterEach: {type: 'afterEach'},
- cb: {callback: true},
- always: {always: true}
- }
-};
-
-function wrapFunction(fn, args) {
- return function (t) {
- return fn.apply(this, [t].concat(args));
- };
-}
-
-class Runner extends EventEmitter {
- constructor(options) {
- super();
-
- options = options || {};
-
- this.file = options.file;
- this.match = options.match || [];
- this.projectDir = options.projectDir;
- this.serial = options.serial;
- this.updateSnapshots = options.updateSnapshots;
- this.snapshotDir = options.snapshotDir;
-
- this.hasStarted = false;
- this.results = [];
- this.snapshots = null;
- this.tests = new TestCollection({
- bail: options.bail,
- failWithoutAssertions: options.failWithoutAssertions,
- compareTestSnapshot: this.compareTestSnapshot.bind(this)
- });
-
- this.chain = optionChain(chainableMethods, (opts, args) => {
- let title;
- let fn;
- let macroArgIndex;
-
- if (this.hasStarted) {
- throw new Error('All tests and hooks must be declared synchronously in your ' +
- 'test file, and cannot be nested within other tests or hooks.');
- }
-
- if (typeof args[0] === 'string') {
- title = args[0];
- fn = args[1];
- macroArgIndex = 2;
- } else {
- fn = args[0];
- title = null;
- macroArgIndex = 1;
- }
-
- if (this.serial) {
- opts.serial = true;
- }
-
- if (args.length > macroArgIndex) {
- args = args.slice(macroArgIndex);
- } else {
- args = null;
- }
-
- if (Array.isArray(fn)) {
- fn.forEach(fn => {
- this.addTest(title, opts, fn, args);
- });
- } else {
- this.addTest(title, opts, fn, args);
- }
- });
- }
-
- addTest(title, metadata, fn, args) {
- if (args) {
- if (fn.title) {
- title = fn.title.apply(fn, [title || ''].concat(args));
- }
-
- fn = wrapFunction(fn, args);
- }
-
- if (metadata.type === 'test' && this.match.length > 0) {
- metadata.exclusive = matcher([title || ''], this.match).length === 1;
- }
-
- const validationError = validateTest(title, fn, metadata);
- if (validationError !== null) {
- throw new TypeError(validationError);
- }
-
- this.tests.add({
- metadata,
- fn,
- title
- });
- }
-
- addTestResult(result) {
- const test = result.result;
- const props = {
- logs: test.logs,
- duration: test.duration,
- title: test.title,
- error: result.reason,
- type: test.metadata.type,
- skip: test.metadata.skipped,
- todo: test.metadata.todo,
- failing: test.metadata.failing
- };
-
- this.results.push(result);
- this.emit('test', props);
- }
-
- buildStats() {
- const stats = {
- failCount: 0,
- knownFailureCount: 0,
- passCount: 0,
- skipCount: 0,
- testCount: 0,
- todoCount: 0
- };
-
- for (const result of this.results) {
- if (!result.passed) {
- // Includes hooks
- stats.failCount++;
- }
-
- const metadata = result.result.metadata;
- if (metadata.type === 'test') {
- stats.testCount++;
-
- if (metadata.skipped) {
- stats.skipCount++;
- } else if (metadata.todo) {
- stats.todoCount++;
- } else if (result.passed) {
- if (metadata.failing) {
- stats.knownFailureCount++;
- } else {
- stats.passCount++;
- }
- }
- }
- }
-
- return stats;
- }
-
- compareTestSnapshot(options) {
- if (!this.snapshots) {
- this.snapshots = snapshotManager.load({
- file: this.file,
- fixedLocation: this.snapshotDir,
- name: path.basename(this.file),
- projectDir: this.projectDir,
- relFile: path.relative(this.projectDir, this.file),
- testDir: path.dirname(this.file),
- updating: this.updateSnapshots
- });
- this.emit('dependency', this.snapshots.snapPath);
- }
-
- return this.snapshots.compare(options);
- }
-
- saveSnapshotState() {
- if (this.snapshots) {
- const files = this.snapshots.save();
- if (files) {
- this.emit('touched', files);
- }
- } else if (this.updateSnapshots) {
- // TODO: There may be unused snapshot files if no test caused the
- // snapshots to be loaded. Prune them. But not if tests (including hooks!)
- // were skipped. Perhaps emit a warning if this occurs?
- }
- }
-
- run(options) {
- if (options.runOnlyExclusive && !this.tests.hasExclusive) {
- return Promise.resolve(null);
- }
-
- this.hasStarted = true;
- this.tests.on('test', result => {
- this.addTestResult(result);
- });
- return Bluebird.try(() => this.tests.build().run());
- }
-
- attributeLeakedError(err) {
- return this.tests.attributeLeakedError(err);
- }
-}
-
-module.exports = Runner;
diff --git a/node_modules/ava/lib/sequence.js b/node_modules/ava/lib/sequence.js
deleted file mode 100644
index 1e5960a98..000000000
--- a/node_modules/ava/lib/sequence.js
+++ /dev/null
@@ -1,94 +0,0 @@
-'use strict';
-
-const beforeExitSubscribers = new Set();
-const beforeExitHandler = () => {
- for (const subscriber of beforeExitSubscribers) {
- subscriber();
- }
-};
-const onBeforeExit = subscriber => {
- if (beforeExitSubscribers.size === 0) {
- // Only listen for the event once, no matter how many Sequences are run
- // concurrently.
- process.on('beforeExit', beforeExitHandler);
- }
-
- beforeExitSubscribers.add(subscriber);
- return {
- dispose() {
- beforeExitSubscribers.delete(subscriber);
- if (beforeExitSubscribers.size === 0) {
- process.removeListener('beforeExit', beforeExitHandler);
- }
- }
- };
-};
-
-class Sequence {
- constructor(runnables, bail) {
- if (!Array.isArray(runnables)) {
- throw new TypeError('Expected an array of runnables');
- }
-
- this.runnables = runnables;
- this.bail = bail || false;
- }
-
- run() {
- const iterator = this.runnables[Symbol.iterator]();
-
- let activeRunnable;
- const beforeExit = onBeforeExit(() => {
- if (activeRunnable.finishDueToInactivity) {
- activeRunnable.finishDueToInactivity();
- }
- });
-
- let allPassed = true;
- const finish = () => {
- beforeExit.dispose();
- return allPassed;
- };
-
- const runNext = () => {
- let promise;
-
- for (let next = iterator.next(); !next.done; next = iterator.next()) {
- activeRunnable = next.value;
- const passedOrPromise = activeRunnable.run();
- if (!passedOrPromise) {
- allPassed = false;
-
- if (this.bail) {
- // Stop if the test failed and bail mode is on.
- break;
- }
- } else if (passedOrPromise !== true) {
- promise = passedOrPromise;
- break;
- }
- }
-
- if (!promise) {
- return finish();
- }
-
- return promise.then(passed => {
- if (!passed) {
- allPassed = false;
-
- if (this.bail) {
- // Stop if the test failed and bail mode is on.
- return finish();
- }
- }
-
- return runNext();
- });
- };
-
- return runNext();
- }
-}
-
-module.exports = Sequence;
diff --git a/node_modules/ava/lib/serialize-error.js b/node_modules/ava/lib/serialize-error.js
deleted file mode 100644
index 13146ff42..000000000
--- a/node_modules/ava/lib/serialize-error.js
+++ /dev/null
@@ -1,99 +0,0 @@
-'use strict';
-const path = require('path');
-const cleanYamlObject = require('clean-yaml-object');
-const StackUtils = require('stack-utils');
-const assert = require('./assert');
-const beautifyStack = require('./beautify-stack');
-
-function isAvaAssertionError(source) {
- return source instanceof assert.AssertionError;
-}
-
-function filter(propertyName, isRoot) {
- return !isRoot || (propertyName !== 'message' && propertyName !== 'name' && propertyName !== 'stack');
-}
-
-const stackUtils = new StackUtils();
-function extractSource(stack) {
- if (!stack) {
- return null;
- }
-
- const firstStackLine = stack.split('\n')[0];
- return stackUtils.parseLine(firstStackLine);
-}
-function buildSource(source) {
- if (!source) {
- return null;
- }
-
- // Assume the CWD is the project directory. This holds since this function
- // is only called in test workers, which are created with their working
- // directory set to the project directory.
- const projectDir = process.cwd();
-
- const file = path.resolve(projectDir, source.file.trim());
- const rel = path.relative(projectDir, file);
-
- const isWithinProject = rel.split(path.sep)[0] !== '..';
- const isDependency = isWithinProject && path.dirname(rel).split(path.sep).indexOf('node_modules') > -1;
-
- return {
- isDependency,
- isWithinProject,
- file,
- line: source.line
- };
-}
-
-module.exports = error => {
- const stack = typeof error.stack === 'string' ?
- beautifyStack(error.stack) :
- null;
-
- const retval = {
- avaAssertionError: isAvaAssertionError(error),
- source: buildSource(extractSource(stack))
- };
- if (stack) {
- retval.stack = stack;
- }
-
- if (retval.avaAssertionError) {
- retval.improperUsage = error.improperUsage;
- retval.message = error.message;
- retval.name = error.name;
- retval.statements = error.statements;
- retval.values = error.values;
-
- if (error.fixedSource) {
- const source = buildSource(error.fixedSource);
- if (source) {
- retval.source = source;
- }
- }
-
- if (error.assertion) {
- retval.assertion = error.assertion;
- }
- if (error.operator) {
- retval.operator = error.operator;
- }
- } else {
- retval.object = cleanYamlObject(error, filter); // Cleanly copy non-standard properties
- if (typeof error.message === 'string') {
- retval.message = error.message;
- }
- if (typeof error.name === 'string') {
- retval.name = error.name;
- }
- }
-
- if (typeof error.stack === 'string') {
- retval.summary = error.stack.split('\n')[0];
- } else {
- retval.summary = JSON.stringify(error);
- }
-
- return retval;
-};
diff --git a/node_modules/ava/lib/snapshot-manager.js b/node_modules/ava/lib/snapshot-manager.js
deleted file mode 100644
index fcc24922e..000000000
--- a/node_modules/ava/lib/snapshot-manager.js
+++ /dev/null
@@ -1,418 +0,0 @@
-'use strict';
-
-const crypto = require('crypto');
-const fs = require('fs');
-const path = require('path');
-const zlib = require('zlib');
-
-const writeFileAtomic = require('@ava/write-file-atomic');
-const concordance = require('concordance');
-const indentString = require('indent-string');
-const makeDir = require('make-dir');
-const md5Hex = require('md5-hex');
-const Buffer = require('safe-buffer').Buffer;
-const convertSourceMap = require('convert-source-map');
-
-const concordanceOptions = require('./concordance-options').snapshotManager;
-
-// Increment if encoding layout or Concordance serialization versions change. Previous AVA versions will not be able to
-// decode buffers generated by a newer version, so changing this value will require a major version bump of AVA itself.
-// The version is encoded as an unsigned 16 bit integer.
-const VERSION = 1;
-
-const VERSION_HEADER = Buffer.alloc(2);
-VERSION_HEADER.writeUInt16LE(VERSION);
-
-// The decoder matches on the trailing newline byte (0x0A).
-const READABLE_PREFIX = Buffer.from(`AVA Snapshot v${VERSION}\n`, 'ascii');
-const REPORT_SEPARATOR = Buffer.from('\n\n', 'ascii');
-const REPORT_TRAILING_NEWLINE = Buffer.from('\n', 'ascii');
-
-const MD5_HASH_LENGTH = 16;
-
-class SnapshotError extends Error {
- constructor(message, snapPath) {
- super(message);
- this.name = 'SnapshotError';
- this.snapPath = snapPath;
- }
-}
-exports.SnapshotError = SnapshotError;
-
-class ChecksumError extends SnapshotError {
- constructor(snapPath) {
- super('Checksum mismatch', snapPath);
- this.name = 'ChecksumError';
- }
-}
-exports.ChecksumError = ChecksumError;
-
-class VersionMismatchError extends SnapshotError {
- constructor(snapPath, version) {
- super('Unexpected snapshot version', snapPath);
- this.name = 'VersionMismatchError';
- this.snapVersion = version;
- this.expectedVersion = VERSION;
- }
-}
-exports.VersionMismatchError = VersionMismatchError;
-
-const LEGACY_SNAPSHOT_HEADER = Buffer.from('// Jest Snapshot v1');
-function isLegacySnapshot(buffer) {
- return LEGACY_SNAPSHOT_HEADER.equals(buffer.slice(0, LEGACY_SNAPSHOT_HEADER.byteLength));
-}
-
-class LegacyError extends SnapshotError {
- constructor(snapPath) {
- super('Legacy snapshot file', snapPath);
- this.name = 'LegacyError';
- }
-}
-exports.LegacyError = LegacyError;
-
-function tryRead(file) {
- try {
- return fs.readFileSync(file);
- } catch (err) {
- if (err.code === 'ENOENT') {
- return null;
- }
-
- throw err;
- }
-}
-
-function withoutLineEndings(buffer) {
- let newLength = buffer.byteLength - 1;
- while (buffer[newLength] === 0x0A || buffer[newLength] === 0x0D) {
- newLength--;
- }
- return buffer.slice(0, newLength);
-}
-
-function formatEntry(label, descriptor) {
- if (label) {
- label = `> ${label}\n\n`;
- }
- const codeBlock = indentString(concordance.formatDescriptor(descriptor, concordanceOptions), 4);
- return Buffer.from(label + codeBlock, 'utf8');
-}
-
-function combineEntries(entries) {
- const buffers = [];
- let byteLength = 0;
-
- const sortedKeys = Array.from(entries.keys()).sort();
- for (const key of sortedKeys) {
- const keyBuffer = Buffer.from(`\n\n## ${key}\n\n`, 'utf8');
- buffers.push(keyBuffer);
- byteLength += keyBuffer.byteLength;
-
- const formattedEntries = entries.get(key);
- const last = formattedEntries[formattedEntries.length - 1];
- for (const entry of formattedEntries) {
- buffers.push(entry);
- byteLength += entry.byteLength;
-
- if (entry !== last) {
- buffers.push(REPORT_SEPARATOR);
- byteLength += REPORT_SEPARATOR.byteLength;
- }
- }
- }
-
- return {buffers, byteLength};
-}
-
-function generateReport(relFile, snapFile, entries) {
- const combined = combineEntries(entries);
- const buffers = combined.buffers;
- let byteLength = combined.byteLength;
-
- const header = Buffer.from(`# Snapshot report for \`${relFile}\`
-
-The actual snapshot is saved in \`${snapFile}\`.
-
-Generated by [AVA](https://ava.li).`, 'utf8');
- buffers.unshift(header);
- byteLength += header.byteLength;
-
- buffers.push(REPORT_TRAILING_NEWLINE);
- byteLength += REPORT_TRAILING_NEWLINE.byteLength;
- return Buffer.concat(buffers, byteLength);
-}
-
-function appendReportEntries(existingReport, entries) {
- const combined = combineEntries(entries);
- const buffers = combined.buffers;
- let byteLength = combined.byteLength;
-
- const prepend = withoutLineEndings(existingReport);
- buffers.unshift(prepend);
- byteLength += prepend.byteLength;
-
- return Buffer.concat(buffers, byteLength);
-}
-
-function encodeSnapshots(buffersByHash) {
- const buffers = [];
- let byteOffset = 0;
-
- // Entry start and end pointers are relative to the header length. This means
- // it's possible to append new entries to an existing snapshot file, without
- // having to rewrite pointers for existing entries.
- const headerLength = Buffer.alloc(4);
- buffers.push(headerLength);
- byteOffset += 4;
-
- // Allows 65535 hashes (tests or identified snapshots) per file.
- const numHashes = Buffer.alloc(2);
- numHashes.writeUInt16LE(buffersByHash.size);
- buffers.push(numHashes);
- byteOffset += 2;
-
- const entries = [];
- for (const pair of buffersByHash) {
- const hash = pair[0];
- const snapshotBuffers = pair[1];
-
- buffers.push(Buffer.from(hash, 'hex'));
- byteOffset += MD5_HASH_LENGTH;
-
- // Allows 65535 snapshots per hash.
- const numSnapshots = Buffer.alloc(2);
- numSnapshots.writeUInt16LE(snapshotBuffers.length, 0);
- buffers.push(numSnapshots);
- byteOffset += 2;
-
- for (const value of snapshotBuffers) {
- // Each pointer is 32 bits, restricting the total, uncompressed buffer to
- // 4 GiB.
- const start = Buffer.alloc(4);
- const end = Buffer.alloc(4);
- entries.push({start, end, value});
-
- buffers.push(start, end);
- byteOffset += 8;
- }
- }
-
- headerLength.writeUInt32LE(byteOffset, 0);
-
- let bodyOffset = 0;
- for (const entry of entries) {
- const start = bodyOffset;
- const end = bodyOffset + entry.value.byteLength;
- entry.start.writeUInt32LE(start, 0);
- entry.end.writeUInt32LE(end, 0);
- buffers.push(entry.value);
- bodyOffset = end;
- }
- byteOffset += bodyOffset;
-
- const compressed = zlib.gzipSync(Buffer.concat(buffers, byteOffset));
- const md5sum = crypto.createHash('md5').update(compressed).digest();
- return Buffer.concat([
- READABLE_PREFIX,
- VERSION_HEADER,
- md5sum,
- compressed
- ], READABLE_PREFIX.byteLength + VERSION_HEADER.byteLength + MD5_HASH_LENGTH + compressed.byteLength);
-}
-
-function decodeSnapshots(buffer, snapPath) {
- if (isLegacySnapshot(buffer)) {
- throw new LegacyError(snapPath);
- }
-
- // The version starts after the readable prefix, which is ended by a newline
- // byte (0x0A).
- const versionOffset = buffer.indexOf(0x0A) + 1;
- const version = buffer.readUInt16LE(versionOffset);
- if (version !== VERSION) {
- throw new VersionMismatchError(snapPath, version);
- }
-
- const md5sumOffset = versionOffset + 2;
- const compressedOffset = md5sumOffset + MD5_HASH_LENGTH;
- const compressed = buffer.slice(compressedOffset);
-
- const md5sum = crypto.createHash('md5').update(compressed).digest();
- const expectedSum = buffer.slice(md5sumOffset, compressedOffset);
- if (!md5sum.equals(expectedSum)) {
- throw new ChecksumError(snapPath);
- }
-
- const decompressed = zlib.gunzipSync(compressed);
- let byteOffset = 0;
-
- const headerLength = decompressed.readUInt32LE(byteOffset);
- byteOffset += 4;
-
- const snapshotsByHash = new Map();
- const numHashes = decompressed.readUInt16LE(byteOffset);
- byteOffset += 2;
-
- for (let count = 0; count < numHashes; count++) {
- const hash = decompressed.toString('hex', byteOffset, byteOffset + MD5_HASH_LENGTH);
- byteOffset += MD5_HASH_LENGTH;
-
- const numSnapshots = decompressed.readUInt16LE(byteOffset);
- byteOffset += 2;
-
- const snapshotsBuffers = new Array(numSnapshots);
- for (let index = 0; index < numSnapshots; index++) {
- const start = decompressed.readUInt32LE(byteOffset) + headerLength;
- byteOffset += 4;
- const end = decompressed.readUInt32LE(byteOffset) + headerLength;
- byteOffset += 4;
- snapshotsBuffers[index] = decompressed.slice(start, end);
- }
-
- // Allow for new entries to be appended to an existing header, which could
- // lead to the same hash being present multiple times.
- if (snapshotsByHash.has(hash)) {
- snapshotsByHash.set(hash, snapshotsByHash.get(hash).concat(snapshotsBuffers));
- } else {
- snapshotsByHash.set(hash, snapshotsBuffers);
- }
- }
-
- return snapshotsByHash;
-}
-
-class Manager {
- constructor(options) {
- this.appendOnly = options.appendOnly;
- this.dir = options.dir;
- this.relFile = options.relFile;
- this.reportFile = options.reportFile;
- this.snapFile = options.snapFile;
- this.snapPath = options.snapPath;
- this.snapshotsByHash = options.snapshotsByHash;
-
- this.hasChanges = false;
- this.reportEntries = new Map();
- }
-
- compare(options) {
- const hash = md5Hex(options.belongsTo);
- const entries = this.snapshotsByHash.get(hash) || [];
- if (options.index > entries.length) {
- throw new RangeError(`Cannot record snapshot ${options.index} for ${JSON.stringify(options.belongsTo)}, exceeds expected index of ${entries.length}`);
- }
- if (options.index === entries.length) {
- this.record(hash, options);
- return {pass: true};
- }
-
- const snapshotBuffer = entries[options.index];
- const actual = concordance.deserialize(snapshotBuffer, concordanceOptions);
-
- const expected = concordance.describe(options.expected, concordanceOptions);
- const pass = concordance.compareDescriptors(actual, expected);
-
- return {actual, expected, pass};
- }
-
- record(hash, options) {
- const descriptor = concordance.describe(options.expected, concordanceOptions);
-
- this.hasChanges = true;
- const snapshot = concordance.serialize(descriptor);
- if (this.snapshotsByHash.has(hash)) {
- this.snapshotsByHash.get(hash).push(snapshot);
- } else {
- this.snapshotsByHash.set(hash, [snapshot]);
- }
-
- const entry = formatEntry(options.label, descriptor);
- if (this.reportEntries.has(options.belongsTo)) {
- this.reportEntries.get(options.belongsTo).push(entry);
- } else {
- this.reportEntries.set(options.belongsTo, [entry]);
- }
- }
-
- save() {
- if (!this.hasChanges) {
- return null;
- }
-
- const snapPath = this.snapPath;
- const buffer = encodeSnapshots(this.snapshotsByHash);
-
- const reportPath = path.join(this.dir, this.reportFile);
- const existingReport = this.appendOnly ? tryRead(reportPath) : null;
- const reportBuffer = existingReport ?
- appendReportEntries(existingReport, this.reportEntries) :
- generateReport(this.relFile, this.snapFile, this.reportEntries);
-
- makeDir.sync(this.dir);
- const tmpSnapPath = writeFileAtomic.sync(snapPath, buffer);
- const tmpReportPath = writeFileAtomic.sync(reportPath, reportBuffer);
-
- return [tmpSnapPath, tmpReportPath, snapPath, reportPath];
- }
-}
-
-function determineSnapshotDir(options) {
- const testDir = determineSourceMappedDir(options);
- if (options.fixedLocation) {
- const relativeTestLocation = path.relative(options.projectDir, testDir);
- return path.join(options.fixedLocation, relativeTestLocation);
- }
-
- const parts = new Set(path.relative(options.projectDir, testDir).split(path.sep));
- if (parts.has('__tests__')) {
- return path.join(testDir, '__snapshots__');
- }
- if (parts.has('test') || parts.has('tests')) { // Accept tests, even though it's not in the default test patterns
- return path.join(testDir, 'snapshots');
- }
-
- return testDir;
-}
-
-function determineSourceMappedDir(options) {
- const source = tryRead(options.file).toString();
- const converter = convertSourceMap.fromSource(source) || convertSourceMap.fromMapFileSource(source, options.testDir);
- if (converter) {
- const map = converter.toObject();
- const firstSource = `${map.sourceRoot || ''}${map.sources[0]}`;
- const sourceFile = path.resolve(options.testDir, firstSource);
- return path.dirname(sourceFile);
- }
-
- return options.testDir;
-}
-
-function load(options) {
- const dir = determineSnapshotDir(options);
- const reportFile = `${options.name}.md`;
- const snapFile = `${options.name}.snap`;
- const snapPath = path.join(dir, snapFile);
-
- let appendOnly = !options.updating;
- let snapshotsByHash;
-
- if (!options.updating) {
- const buffer = tryRead(snapPath);
- if (buffer) {
- snapshotsByHash = decodeSnapshots(buffer, snapPath);
- } else {
- appendOnly = false;
- }
- }
-
- return new Manager({
- appendOnly,
- dir,
- relFile: options.relFile,
- reportFile,
- snapFile,
- snapPath,
- snapshotsByHash: snapshotsByHash || new Map()
- });
-}
-exports.load = load;
diff --git a/node_modules/ava/lib/test-collection.js b/node_modules/ava/lib/test-collection.js
deleted file mode 100644
index fd34bc489..000000000
--- a/node_modules/ava/lib/test-collection.js
+++ /dev/null
@@ -1,230 +0,0 @@
-'use strict';
-const EventEmitter = require('events');
-const fnName = require('fn-name');
-const Concurrent = require('./concurrent');
-const Sequence = require('./sequence');
-const Test = require('./test');
-
-class TestCollection extends EventEmitter {
- constructor(options) {
- super();
-
- this.bail = options.bail;
- this.failWithoutAssertions = options.failWithoutAssertions;
- this.compareTestSnapshot = options.compareTestSnapshot;
- this.hasExclusive = false;
- this.testCount = 0;
-
- this.tests = {
- concurrent: [],
- serial: []
- };
-
- this.hooks = {
- before: [],
- beforeEach: [],
- after: [],
- afterAlways: [],
- afterEach: [],
- afterEachAlways: []
- };
-
- this.pendingTestInstances = new Set();
-
- this._emitTestResult = this._emitTestResult.bind(this);
- }
-
- add(test) {
- const metadata = test.metadata;
- const type = metadata.type;
-
- if (!type) {
- throw new Error('Test type must be specified');
- }
-
- if (!test.title && test.fn) {
- test.title = fnName(test.fn);
- }
-
- // Workaround for Babel giving anonymous functions a name
- if (test.title === 'callee$0$0') {
- test.title = null;
- }
-
- if (!test.title) {
- if (type === 'test') {
- test.title = '[anonymous]';
- } else {
- test.title = type;
- }
- }
-
- if (metadata.always && type !== 'after' && type !== 'afterEach') {
- throw new Error('"always" can only be used with after and afterEach hooks');
- }
-
- // Add a hook
- if (type !== 'test') {
- if (metadata.exclusive) {
- throw new Error(`"only" cannot be used with a ${type} hook`);
- }
-
- this.hooks[type + (metadata.always ? 'Always' : '')].push(test);
- return;
- }
-
- this.testCount++;
-
- // Add `.only()` tests if `.only()` was used previously
- if (this.hasExclusive && !metadata.exclusive) {
- return;
- }
-
- if (metadata.exclusive && !this.hasExclusive) {
- this.tests.concurrent = [];
- this.tests.serial = [];
- this.hasExclusive = true;
- }
-
- if (metadata.serial) {
- this.tests.serial.push(test);
- } else {
- this.tests.concurrent.push(test);
- }
- }
-
- _skippedTest(test) {
- return {
- run: () => {
- this._emitTestResult({
- passed: true,
- result: test
- });
-
- return true;
- }
- };
- }
-
- _emitTestResult(result) {
- this.pendingTestInstances.delete(result.result);
- this.emit('test', result);
- }
-
- _buildHooks(hooks, testTitle, context) {
- return hooks.map(hook => {
- const test = this._buildHook(hook, testTitle, context);
-
- if (hook.metadata.skipped || hook.metadata.todo) {
- return this._skippedTest(test);
- }
-
- return test;
- });
- }
-
- _buildHook(hook, testTitle, contextRef) {
- let title = hook.title;
-
- if (testTitle) {
- title += ` for ${testTitle}`;
- }
-
- if (!contextRef) {
- contextRef = null;
- }
-
- const test = new Test({
- contextRef,
- failWithoutAssertions: false,
- fn: hook.fn,
- compareTestSnapshot: this.compareTestSnapshot,
- metadata: hook.metadata,
- onResult: this._emitTestResult,
- title
- });
- this.pendingTestInstances.add(test);
- return test;
- }
-
- _buildTest(test, contextRef) {
- if (!contextRef) {
- contextRef = null;
- }
-
- test = new Test({
- contextRef,
- failWithoutAssertions: this.failWithoutAssertions,
- fn: test.fn,
- compareTestSnapshot: this.compareTestSnapshot,
- metadata: test.metadata,
- onResult: this._emitTestResult,
- title: test.title
- });
- this.pendingTestInstances.add(test);
- return test;
- }
-
- _buildTestWithHooks(test) {
- if (test.metadata.skipped || test.metadata.todo) {
- return new Sequence([this._skippedTest(this._buildTest(test))], true);
- }
-
- const context = {context: {}};
-
- const beforeHooks = this._buildHooks(this.hooks.beforeEach, test.title, context);
- const afterHooks = this._buildHooks(this.hooks.afterEach, test.title, context);
-
- let sequence = new Sequence([].concat(beforeHooks, this._buildTest(test, context), afterHooks), true);
- if (this.hooks.afterEachAlways.length > 0) {
- const afterAlwaysHooks = new Sequence(this._buildHooks(this.hooks.afterEachAlways, test.title, context));
- sequence = new Sequence([sequence, afterAlwaysHooks], false);
- }
- return sequence;
- }
-
- _buildTests(tests) {
- return tests.map(test => this._buildTestWithHooks(test));
- }
-
- _hasUnskippedTests() {
- return this.tests.serial.concat(this.tests.concurrent)
- .some(test => {
- return !(test.metadata && test.metadata.skipped === true);
- });
- }
-
- build() {
- const serialTests = new Sequence(this._buildTests(this.tests.serial), this.bail);
- const concurrentTests = new Concurrent(this._buildTests(this.tests.concurrent), this.bail);
- const allTests = new Sequence([serialTests, concurrentTests]);
-
- let finalTests;
- // Only run before and after hooks when there are unskipped tests
- if (this._hasUnskippedTests()) {
- const beforeHooks = new Sequence(this._buildHooks(this.hooks.before));
- const afterHooks = new Sequence(this._buildHooks(this.hooks.after));
- finalTests = new Sequence([beforeHooks, allTests, afterHooks], true);
- } else {
- finalTests = new Sequence([allTests], true);
- }
-
- if (this.hooks.afterAlways.length > 0) {
- const afterAlwaysHooks = new Sequence(this._buildHooks(this.hooks.afterAlways));
- finalTests = new Sequence([finalTests, afterAlwaysHooks], false);
- }
-
- return finalTests;
- }
-
- attributeLeakedError(err) {
- for (const test of this.pendingTestInstances) {
- if (test.attributeLeakedError(err)) {
- return true;
- }
- }
- return false;
- }
-}
-
-module.exports = TestCollection;
diff --git a/node_modules/ava/lib/test-worker.js b/node_modules/ava/lib/test-worker.js
deleted file mode 100644
index 84fba364e..000000000
--- a/node_modules/ava/lib/test-worker.js
+++ /dev/null
@@ -1,141 +0,0 @@
-'use strict';
-
-// Check if the test is being run without AVA cli
-{
- const path = require('path');
- const chalk = require('chalk');
-
- const isForked = typeof process.send === 'function';
- if (!isForked) {
- const fp = path.relative('.', process.argv[1]);
-
- console.log();
- console.error('Test files must be run with the AVA CLI:\n\n ' + chalk.grey.dim('$') + ' ' + chalk.cyan('ava ' + fp) + '\n');
-
- process.exit(1); // eslint-disable-line unicorn/no-process-exit
- }
-}
-
-const currentlyUnhandled = require('currently-unhandled')();
-const isObj = require('is-obj');
-
-const adapter = require('./process-adapter');
-const globals = require('./globals');
-
-const opts = adapter.opts;
-globals.options = opts;
-
-const serializeError = require('./serialize-error');
-
-(opts.require || []).forEach(x => require(x));
-
-adapter.installSourceMapSupport();
-adapter.installPrecompilerHook();
-
-const testPath = opts.file;
-
-const dependencies = new Set();
-adapter.installDependencyTracking(dependencies, testPath);
-
-const touchedFiles = new Set();
-
-// Set when main.js is required (since test files should have `require('ava')`).
-let runner = null;
-exports.setRunner = newRunner => {
- runner = newRunner;
- runner.on('dependency', file => {
- dependencies.add(file);
- });
- runner.on('touched', files => {
- for (const file of files) {
- touchedFiles.add(file);
- }
- });
-};
-
-require(testPath);
-
-// If AVA was not required, show an error
-if (!runner) {
- adapter.send('no-tests', {avaRequired: false});
-}
-
-function attributeLeakedError(err) {
- if (!runner) {
- return false;
- }
-
- return runner.attributeLeakedError(err);
-}
-
-const attributedRejections = new Set();
-process.on('unhandledRejection', (reason, promise) => {
- if (attributeLeakedError(reason)) {
- attributedRejections.add(promise);
- }
-});
-
-process.on('uncaughtException', exception => {
- if (attributeLeakedError(exception)) {
- return;
- }
-
- let serialized;
- try {
- serialized = serializeError(exception);
- } catch (ignore) { // eslint-disable-line unicorn/catch-error-name
- // Avoid using serializeError
- const err = new Error('Failed to serialize uncaught exception');
- serialized = {
- avaAssertionError: false,
- name: err.name,
- message: err.message,
- stack: err.stack
- };
- }
-
- // Ensure the IPC channel is refereced. The uncaught exception will kick off
- // the teardown sequence, for which the messages must be received.
- adapter.ipcChannel.ref();
-
- adapter.send('uncaughtException', {exception: serialized});
-});
-
-let tearingDown = false;
-process.on('ava-teardown', () => {
- // AVA-teardown can be sent more than once
- if (tearingDown) {
- return;
- }
- tearingDown = true;
-
- let rejections = currentlyUnhandled()
- .filter(rejection => !attributedRejections.has(rejection.promise));
-
- if (rejections.length > 0) {
- rejections = rejections.map(rejection => {
- let reason = rejection.reason;
- if (!isObj(reason) || typeof reason.message !== 'string') {
- reason = {
- message: String(reason)
- };
- }
- return serializeError(reason);
- });
-
- adapter.send('unhandledRejections', {rejections});
- }
-
- // Include dependencies in the final teardown message. This ensures the full
- // set of dependencies is included no matter how the process exits, unless
- // it flat out crashes. Also include any files that AVA touched during the
- // test run. This allows the watcher to ignore modifications to those files.
- adapter.send('teardown', {
- dependencies: Array.from(dependencies),
- touchedFiles: Array.from(touchedFiles)
- });
-});
-
-process.on('ava-exit', () => {
- process.exit(0); // eslint-disable-line xo/no-process-exit
-});
diff --git a/node_modules/ava/lib/test.js b/node_modules/ava/lib/test.js
deleted file mode 100644
index 839101b40..000000000
--- a/node_modules/ava/lib/test.js
+++ /dev/null
@@ -1,441 +0,0 @@
-'use strict';
-const isGeneratorFn = require('is-generator-fn');
-const co = require('co-with-promise');
-const concordance = require('concordance');
-const observableToPromise = require('observable-to-promise');
-const isPromise = require('is-promise');
-const isObservable = require('is-observable');
-const plur = require('plur');
-const assert = require('./assert');
-const globals = require('./globals');
-const concordanceOptions = require('./concordance-options').default;
-
-function formatErrorValue(label, error) {
- const formatted = concordance.format(error, concordanceOptions);
- return {label, formatted};
-}
-
-class SkipApi {
- constructor(test) {
- this._test = test;
- }
-}
-
-const captureStack = start => {
- const limitBefore = Error.stackTraceLimit;
- Error.stackTraceLimit = 1;
- const obj = {};
- Error.captureStackTrace(obj, start);
- Error.stackTraceLimit = limitBefore;
- return obj.stack;
-};
-
-class ExecutionContext {
- constructor(test) {
- Object.defineProperties(this, {
- _test: {value: test},
- skip: {value: new SkipApi(test)}
- });
- }
-
- plan(ct) {
- this._test.plan(ct, captureStack(this.plan));
- }
-
- get end() {
- const end = this._test.bindEndCallback();
- const endFn = err => end(err, captureStack(endFn));
- return endFn;
- }
-
- get title() {
- return this._test.title;
- }
-
- get context() {
- const contextRef = this._test.contextRef;
- return contextRef && contextRef.context;
- }
-
- set context(context) {
- const contextRef = this._test.contextRef;
-
- if (!contextRef) {
- this._test.saveFirstError(new Error(`\`t.context\` is not available in ${this._test.metadata.type} tests`));
- return;
- }
-
- contextRef.context = context;
- }
-
- _throwsArgStart(assertion, file, line) {
- this._test.trackThrows({assertion, file, line});
- }
-
- _throwsArgEnd() {
- this._test.trackThrows(null);
- }
-}
-
-{
- const assertions = assert.wrapAssertions({
- log(executionContext, text) {
- executionContext._test.addLog(text);
- },
-
- pass(executionContext) {
- executionContext._test.countPassedAssertion();
- },
-
- pending(executionContext, promise) {
- executionContext._test.addPendingAssertion(promise);
- },
-
- fail(executionContext, error) {
- executionContext._test.addFailedAssertion(error);
- }
- });
- Object.assign(ExecutionContext.prototype, assertions);
-
- function skipFn() {
- this._test.countPassedAssertion();
- }
- Object.keys(assertions).forEach(el => {
- SkipApi.prototype[el] = skipFn;
- });
-}
-
-class Test {
- constructor(options) {
- this.contextRef = options.contextRef;
- this.failWithoutAssertions = options.failWithoutAssertions;
- this.fn = isGeneratorFn(options.fn) ? co.wrap(options.fn) : options.fn;
- this.metadata = options.metadata;
- this.onResult = options.onResult;
- this.title = options.title;
- this.logs = [];
-
- this.snapshotInvocationCount = 0;
- this.compareWithSnapshot = assertionOptions => {
- const belongsTo = assertionOptions.id || this.title;
- const expected = assertionOptions.expected;
- const index = assertionOptions.id ? 0 : this.snapshotInvocationCount++;
- const label = assertionOptions.id ? '' : assertionOptions.message || `Snapshot ${this.snapshotInvocationCount}`;
- return options.compareTestSnapshot({belongsTo, expected, index, label});
- };
-
- this.assertCount = 0;
- this.assertError = undefined;
- this.calledEnd = false;
- this.duration = null;
- this.endCallbackFinisher = null;
- this.finishDueToAttributedError = null;
- this.finishDueToInactivity = null;
- this.finishing = false;
- this.pendingAssertionCount = 0;
- this.pendingThrowsAssertion = null;
- this.planCount = null;
- this.startedAt = 0;
- }
-
- bindEndCallback() {
- if (this.metadata.callback) {
- return (err, stack) => {
- this.endCallback(err, stack);
- };
- }
-
- throw new Error('`t.end()`` is not supported in this context. To use `t.end()` as a callback, you must use "callback mode" via `test.cb(testName, fn)`');
- }
-
- endCallback(err, stack) {
- if (this.calledEnd) {
- this.saveFirstError(new Error('`t.end()` called more than once'));
- return;
- }
- this.calledEnd = true;
-
- if (err) {
- this.saveFirstError(new assert.AssertionError({
- actual: err,
- message: 'Callback called with an error',
- stack,
- values: [formatErrorValue('Callback called with an error:', err)]
- }));
- }
-
- if (this.endCallbackFinisher) {
- this.endCallbackFinisher();
- }
- }
-
- createExecutionContext() {
- return new ExecutionContext(this);
- }
-
- countPassedAssertion() {
- if (this.finishing) {
- this.saveFirstError(new Error('Assertion passed, but test has already finished'));
- }
-
- this.assertCount++;
- }
-
- addLog(text) {
- this.logs.push(text);
- }
-
- addPendingAssertion(promise) {
- if (this.finishing) {
- this.saveFirstError(new Error('Assertion passed, but test has already finished'));
- }
-
- this.assertCount++;
- this.pendingAssertionCount++;
- promise
- .catch(err => this.saveFirstError(err))
- .then(() => this.pendingAssertionCount--);
- }
-
- addFailedAssertion(error) {
- if (this.finishing) {
- this.saveFirstError(new Error('Assertion failed, but test has already finished'));
- }
-
- this.assertCount++;
- this.saveFirstError(error);
- }
-
- saveFirstError(err) {
- if (!this.assertError) {
- this.assertError = err;
- }
- }
-
- plan(count, planStack) {
- if (typeof count !== 'number') {
- throw new TypeError('Expected a number');
- }
-
- this.planCount = count;
-
- // In case the `planCount` doesn't match `assertCount, we need the stack of
- // this function to throw with a useful stack.
- this.planStack = planStack;
- }
-
- verifyPlan() {
- if (!this.assertError && this.planCount !== null && this.planCount !== this.assertCount) {
- this.saveFirstError(new assert.AssertionError({
- assertion: 'plan',
- message: `Planned for ${this.planCount} ${plur('assertion', this.planCount)}, but got ${this.assertCount}.`,
- operator: '===',
- stack: this.planStack
- }));
- }
- }
-
- verifyAssertions() {
- if (!this.assertError) {
- if (this.failWithoutAssertions && !this.calledEnd && this.planCount === null && this.assertCount === 0) {
- this.saveFirstError(new Error('Test finished without running any assertions'));
- } else if (this.pendingAssertionCount > 0) {
- this.saveFirstError(new Error('Test finished, but an assertion is still pending'));
- }
- }
- }
-
- trackThrows(pending) {
- this.pendingThrowsAssertion = pending;
- }
-
- detectImproperThrows(err) {
- if (!this.pendingThrowsAssertion) {
- return false;
- }
-
- const pending = this.pendingThrowsAssertion;
- this.pendingThrowsAssertion = null;
-
- const values = [];
- if (err) {
- values.push(formatErrorValue(`The following error was thrown, possibly before \`t.${pending.assertion}()\` could be called:`, err));
- }
-
- this.saveFirstError(new assert.AssertionError({
- assertion: pending.assertion,
- fixedSource: {file: pending.file, line: pending.line},
- improperUsage: true,
- message: `Improper usage of \`t.${pending.assertion}()\` detected`,
- stack: err instanceof Error && err.stack,
- values
- }));
- return true;
- }
-
- waitForPendingThrowsAssertion() {
- return new Promise(resolve => {
- this.finishDueToAttributedError = () => {
- resolve(this.finishPromised());
- };
-
- this.finishDueToInactivity = () => {
- this.detectImproperThrows();
- resolve(this.finishPromised());
- };
-
- // Wait up to a second to see if an error can be attributed to the
- // pending assertion.
- globals.setTimeout(() => this.finishDueToInactivity(), 1000).unref();
- });
- }
-
- attributeLeakedError(err) {
- if (!this.detectImproperThrows(err)) {
- return false;
- }
-
- this.finishDueToAttributedError();
- return true;
- }
-
- callFn() {
- try {
- return {
- ok: true,
- retval: this.fn(this.createExecutionContext())
- };
- } catch (err) {
- return {
- ok: false,
- error: err
- };
- }
- }
-
- run() {
- this.startedAt = globals.now();
-
- const result = this.callFn();
- if (!result.ok) {
- if (!this.detectImproperThrows(result.error)) {
- this.saveFirstError(new assert.AssertionError({
- message: 'Error thrown in test',
- stack: result.error instanceof Error && result.error.stack,
- values: [formatErrorValue('Error thrown in test:', result.error)]
- }));
- }
- return this.finish();
- }
-
- const returnedObservable = isObservable(result.retval);
- const returnedPromise = isPromise(result.retval);
-
- let promise;
- if (returnedObservable) {
- promise = observableToPromise(result.retval);
- } else if (returnedPromise) {
- // `retval` can be any thenable, so convert to a proper promise.
- promise = Promise.resolve(result.retval);
- }
-
- if (this.metadata.callback) {
- if (returnedObservable || returnedPromise) {
- const asyncType = returnedObservable ? 'observables' : 'promises';
- this.saveFirstError(new Error(`Do not return ${asyncType} from tests declared via \`test.cb(...)\`, if you want to return a promise simply declare the test via \`test(...)\``));
- return this.finish();
- }
-
- if (this.calledEnd) {
- return this.finish();
- }
-
- return new Promise(resolve => {
- this.endCallbackFinisher = () => {
- resolve(this.finishPromised());
- };
-
- this.finishDueToAttributedError = () => {
- resolve(this.finishPromised());
- };
-
- this.finishDueToInactivity = () => {
- this.saveFirstError(new Error('`t.end()` was never called'));
- resolve(this.finishPromised());
- };
- });
- }
-
- if (promise) {
- return new Promise(resolve => {
- this.finishDueToAttributedError = () => {
- resolve(this.finishPromised());
- };
-
- this.finishDueToInactivity = () => {
- const err = returnedObservable ?
- new Error('Observable returned by test never completed') :
- new Error('Promise returned by test never resolved');
- this.saveFirstError(err);
- resolve(this.finishPromised());
- };
-
- promise
- .catch(err => {
- if (!this.detectImproperThrows(err)) {
- this.saveFirstError(new assert.AssertionError({
- message: 'Rejected promise returned by test',
- stack: err instanceof Error && err.stack,
- values: [formatErrorValue('Rejected promise returned by test. Reason:', err)]
- }));
- }
- })
- .then(() => resolve(this.finishPromised()));
- });
- }
-
- return this.finish();
- }
-
- finish() {
- this.finishing = true;
-
- if (!this.assertError && this.pendingThrowsAssertion) {
- return this.waitForPendingThrowsAssertion();
- }
-
- this.verifyPlan();
- this.verifyAssertions();
-
- this.duration = globals.now() - this.startedAt;
-
- let reason = this.assertError;
- let passed = !reason;
-
- if (this.metadata.failing) {
- passed = !passed;
-
- if (passed) {
- reason = undefined;
- } else {
- reason = new Error('Test was expected to fail, but succeeded, you should stop marking the test as failing');
- }
- }
-
- this.onResult({
- passed,
- result: this,
- reason
- });
-
- return passed;
- }
-
- finishPromised() {
- return new Promise(resolve => {
- resolve(this.finish());
- });
- }
-}
-
-module.exports = Test;
diff --git a/node_modules/ava/lib/validate-test.js b/node_modules/ava/lib/validate-test.js
deleted file mode 100644
index 8258a5990..000000000
--- a/node_modules/ava/lib/validate-test.js
+++ /dev/null
@@ -1,48 +0,0 @@
-'use strict';
-
-function validate(title, fn, metadata) {
- if (metadata.type !== 'test') {
- if (metadata.exclusive) {
- return '`only` is only for tests and cannot be used with hooks';
- }
-
- if (metadata.failing) {
- return '`failing` is only for tests and cannot be used with hooks';
- }
-
- if (metadata.todo) {
- return '`todo` is only for documentation of future tests and cannot be used with hooks';
- }
- }
-
- if (metadata.todo) {
- if (typeof fn === 'function') {
- return '`todo` tests are not allowed to have an implementation. Use ' +
- '`test.skip()` for tests with an implementation.';
- }
-
- if (typeof title !== 'string') {
- return '`todo` tests require a title';
- }
-
- if (metadata.skipped || metadata.failing || metadata.exclusive) {
- return '`todo` tests are just for documentation and cannot be used with `skip`, `only`, or `failing`';
- }
- } else if (typeof fn !== 'function') {
- return 'Expected an implementation. Use `test.todo()` for tests without an implementation.';
- }
-
- if (metadata.always) {
- if (!(metadata.type === 'after' || metadata.type === 'afterEach')) {
- return '`always` can only be used with `after` and `afterEach`';
- }
- }
-
- if (metadata.skipped && metadata.exclusive) {
- return '`only` tests cannot be skipped';
- }
-
- return null;
-}
-
-module.exports = validate;
diff --git a/node_modules/ava/lib/watcher.js b/node_modules/ava/lib/watcher.js
deleted file mode 100644
index 3f5ed3ee7..000000000
--- a/node_modules/ava/lib/watcher.js
+++ /dev/null
@@ -1,376 +0,0 @@
-'use strict';
-const nodePath = require('path');
-const debug = require('debug')('ava:watcher');
-const diff = require('lodash.difference');
-const chokidar = require('chokidar');
-const flatten = require('arr-flatten');
-const union = require('array-union');
-const uniq = require('array-uniq');
-const AvaFiles = require('./ava-files');
-
-function rethrowAsync(err) {
- // Don't swallow exceptions. Note that any
- // expected error should already have been logged
- setImmediate(() => {
- throw err;
- });
-}
-
-const MIN_DEBOUNCE_DELAY = 10;
-const INITIAL_DEBOUNCE_DELAY = 100;
-
-class Debouncer {
- constructor(watcher) {
- this.watcher = watcher;
- this.timer = null;
- this.repeat = false;
- }
-
- debounce(delay) {
- if (this.timer) {
- this.again = true;
- return;
- }
-
- delay = delay ? Math.max(delay, MIN_DEBOUNCE_DELAY) : INITIAL_DEBOUNCE_DELAY;
-
- const timer = setTimeout(() => {
- this.watcher.busy.then(() => {
- // Do nothing if debouncing was canceled while waiting for the busy
- // promise to fulfil
- if (this.timer !== timer) {
- return;
- }
-
- if (this.again) {
- this.timer = null;
- this.again = false;
- this.debounce(delay / 2);
- } else {
- this.watcher.runAfterChanges();
- this.timer = null;
- this.again = false;
- }
- });
- }, delay);
-
- this.timer = timer;
- }
-
- cancel() {
- if (this.timer) {
- clearTimeout(this.timer);
- this.timer = null;
- this.again = false;
- }
- }
-}
-
-class TestDependency {
- constructor(file, sources) {
- this.file = file;
- this.sources = sources;
- }
-
- contains(source) {
- return this.sources.indexOf(source) !== -1;
- }
-}
-
-class Watcher {
- constructor(logger, api, files, sources) {
- this.debouncer = new Debouncer(this);
- this.avaFiles = new AvaFiles({
- files,
- sources
- });
-
- this.clearLogOnNextRun = true;
- this.runVector = 0;
- this.previousFiles = files;
- this.run = (specificFiles, updateSnapshots) => {
- if (this.runVector > 0) {
- const cleared = this.clearLogOnNextRun && logger.clear();
- if (!cleared) {
- logger.reset();
- logger.section();
- }
- this.clearLogOnNextRun = true;
-
- logger.reset();
- logger.start();
- }
-
- this.runVector += 1;
-
- const currentVector = this.runVector;
-
- let runOnlyExclusive = false;
-
- if (specificFiles) {
- const exclusiveFiles = specificFiles.filter(file => this.filesWithExclusiveTests.indexOf(file) !== -1);
-
- runOnlyExclusive = exclusiveFiles.length !== this.filesWithExclusiveTests.length;
-
- if (runOnlyExclusive) {
- // The test files that previously contained exclusive tests are always
- // run, together with the remaining specific files.
- const remainingFiles = diff(specificFiles, exclusiveFiles);
- specificFiles = this.filesWithExclusiveTests.concat(remainingFiles);
- }
- }
-
- this.touchedFiles.clear();
- this.previousFiles = specificFiles || files;
- this.busy = api.run(this.previousFiles, {runOnlyExclusive, updateSnapshots: updateSnapshots === true})
- .then(runStatus => {
- runStatus.previousFailCount = this.sumPreviousFailures(currentVector);
- logger.finish(runStatus);
-
- const badCounts = runStatus.failCount + runStatus.rejectionCount + runStatus.exceptionCount;
- this.clearLogOnNextRun = this.clearLogOnNextRun && badCounts === 0;
- })
- .catch(rethrowAsync);
- };
-
- this.testDependencies = [];
- this.trackTestDependencies(api, sources);
-
- this.touchedFiles = new Set();
- this.trackTouchedFiles(api);
-
- this.filesWithExclusiveTests = [];
- this.trackExclusivity(api);
-
- this.filesWithFailures = [];
- this.trackFailures(api);
-
- this.dirtyStates = {};
- this.watchFiles();
- this.rerunAll();
- }
-
- watchFiles() {
- const patterns = this.avaFiles.getChokidarPatterns();
-
- chokidar.watch(patterns.paths, {
- ignored: patterns.ignored,
- ignoreInitial: true
- }).on('all', (event, path) => {
- if (event === 'add' || event === 'change' || event === 'unlink') {
- debug('Detected %s of %s', event, path);
- this.dirtyStates[path] = event;
- this.debouncer.debounce();
- }
- });
- }
-
- trackTestDependencies(api) {
- const relative = absPath => nodePath.relative(process.cwd(), absPath);
-
- api.on('test-run', runStatus => {
- runStatus.on('dependencies', (file, dependencies) => {
- const sourceDeps = dependencies.map(x => relative(x)).filter(this.avaFiles.isSource);
- this.updateTestDependencies(file, sourceDeps);
- });
- });
- }
-
- updateTestDependencies(file, sources) {
- if (sources.length === 0) {
- this.testDependencies = this.testDependencies.filter(dep => dep.file !== file);
- return;
- }
-
- const isUpdate = this.testDependencies.some(dep => {
- if (dep.file !== file) {
- return false;
- }
-
- dep.sources = sources;
-
- return true;
- });
-
- if (!isUpdate) {
- this.testDependencies.push(new TestDependency(file, sources));
- }
- }
-
- trackTouchedFiles(api) {
- api.on('test-run', runStatus => {
- runStatus.on('touchedFiles', files => {
- for (const file of files) {
- this.touchedFiles.add(nodePath.relative(process.cwd(), file));
- }
- });
- });
- }
-
- trackExclusivity(api) {
- api.on('stats', stats => {
- this.updateExclusivity(stats.file, stats.hasExclusive);
- });
- }
-
- updateExclusivity(file, hasExclusiveTests) {
- const index = this.filesWithExclusiveTests.indexOf(file);
-
- if (hasExclusiveTests && index === -1) {
- this.filesWithExclusiveTests.push(file);
- } else if (!hasExclusiveTests && index !== -1) {
- this.filesWithExclusiveTests.splice(index, 1);
- }
- }
-
- trackFailures(api) {
- api.on('test-run', (runStatus, files) => {
- files.forEach(file => {
- this.pruneFailures(nodePath.relative(process.cwd(), file));
- });
-
- const currentVector = this.runVector;
- runStatus.on('error', err => {
- this.countFailure(err.file, currentVector);
- });
- runStatus.on('test', result => {
- if (result.error) {
- this.countFailure(result.file, currentVector);
- }
- });
- });
- }
-
- pruneFailures(file) {
- this.filesWithFailures = this.filesWithFailures.filter(state => state.file !== file);
- }
-
- countFailure(file, vector) {
- const isUpdate = this.filesWithFailures.some(state => {
- if (state.file !== file) {
- return false;
- }
-
- state.count++;
- return true;
- });
-
- if (!isUpdate) {
- this.filesWithFailures.push({
- file,
- vector,
- count: 1
- });
- }
- }
-
- sumPreviousFailures(beforeVector) {
- let total = 0;
-
- this.filesWithFailures.forEach(state => {
- if (state.vector < beforeVector) {
- total += state.count;
- }
- });
-
- return total;
- }
-
- cleanUnlinkedTests(unlinkedTests) {
- unlinkedTests.forEach(testFile => {
- this.updateTestDependencies(testFile, []);
- this.updateExclusivity(testFile, false);
- this.pruneFailures(testFile);
- });
- }
-
- observeStdin(stdin) {
- stdin.resume();
- stdin.setEncoding('utf8');
-
- stdin.on('data', data => {
- data = data.trim().toLowerCase();
- if (data !== 'r' && data !== 'rs' && data !== 'u') {
- return;
- }
-
- // Cancel the debouncer, it might rerun specific tests whereas *all* tests
- // need to be rerun
- this.debouncer.cancel();
- this.busy.then(() => {
- // Cancel the debouncer again, it might have restarted while waiting for
- // the busy promise to fulfil
- this.debouncer.cancel();
- this.clearLogOnNextRun = false;
- if (data === 'u') {
- this.updatePreviousSnapshots();
- } else {
- this.rerunAll();
- }
- });
- });
- }
-
- rerunAll() {
- this.dirtyStates = {};
- this.run();
- }
-
- updatePreviousSnapshots() {
- this.dirtyStates = {};
- this.run(this.previousFiles, true);
- }
-
- runAfterChanges() {
- const dirtyStates = this.dirtyStates;
- this.dirtyStates = {};
-
- const dirtyPaths = Object.keys(dirtyStates).filter(path => {
- if (this.touchedFiles.has(path)) {
- debug('Ignoring known touched file %s', path);
- this.touchedFiles.delete(path);
- return false;
- }
- return true;
- });
- const dirtyTests = dirtyPaths.filter(this.avaFiles.isTest);
- const dirtySources = diff(dirtyPaths, dirtyTests);
- const addedOrChangedTests = dirtyTests.filter(path => dirtyStates[path] !== 'unlink');
- const unlinkedTests = diff(dirtyTests, addedOrChangedTests);
-
- this.cleanUnlinkedTests(unlinkedTests);
-
- // No need to rerun tests if the only change is that tests were deleted
- if (unlinkedTests.length === dirtyPaths.length) {
- return;
- }
-
- if (dirtySources.length === 0) {
- // Run any new or changed tests
- this.run(addedOrChangedTests);
- return;
- }
-
- // Try to find tests that depend on the changed source files
- const testsBySource = dirtySources.map(path => {
- return this.testDependencies.filter(dep => dep.contains(path)).map(dep => {
- debug('%s is a dependency of %s', path, dep.file);
- return dep.file;
- });
- }, this).filter(tests => tests.length > 0);
-
- // Rerun all tests if source files were changed that could not be traced to
- // specific tests
- if (testsBySource.length !== dirtySources.length) {
- debug('Sources remain that cannot be traced to specific tests: %O', dirtySources);
- debug('Rerunning all tests');
- this.run();
- return;
- }
-
- // Run all affected tests
- this.run(union(addedOrChangedTests, uniq(flatten(testsBySource))));
- }
-}
-
-module.exports = Watcher;
diff --git a/node_modules/ava/license b/node_modules/ava/license
deleted file mode 100644
index e7af2f771..000000000
--- a/node_modules/ava/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/ava/node_modules/.bin/import-local-fixture b/node_modules/ava/node_modules/.bin/import-local-fixture
deleted file mode 120000
index 653f8d95a..000000000
--- a/node_modules/ava/node_modules/.bin/import-local-fixture
+++ /dev/null
@@ -1 +0,0 @@
-../../../import-local/fixtures/cli.js \ No newline at end of file
diff --git a/node_modules/ava/node_modules/.bin/js-yaml b/node_modules/ava/node_modules/.bin/js-yaml
deleted file mode 120000
index daf9f1158..000000000
--- a/node_modules/ava/node_modules/.bin/js-yaml
+++ /dev/null
@@ -1 +0,0 @@
-../../../js-yaml/bin/js-yaml.js \ No newline at end of file
diff --git a/node_modules/ava/node_modules/.bin/semver b/node_modules/ava/node_modules/.bin/semver
deleted file mode 120000
index b3ca6032f..000000000
--- a/node_modules/ava/node_modules/.bin/semver
+++ /dev/null
@@ -1 +0,0 @@
-../../../semver/bin/semver \ No newline at end of file
diff --git a/node_modules/ava/node_modules/ansi-regex/index.js b/node_modules/ava/node_modules/ansi-regex/index.js
deleted file mode 100644
index c4aaecf50..000000000
--- a/node_modules/ava/node_modules/ansi-regex/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-'use strict';
-
-module.exports = () => {
- const pattern = [
- '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
- ].join('|');
-
- return new RegExp(pattern, 'g');
-};
diff --git a/node_modules/ava/node_modules/ansi-regex/license b/node_modules/ava/node_modules/ansi-regex/license
deleted file mode 100644
index e7af2f771..000000000
--- a/node_modules/ava/node_modules/ansi-regex/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/ava/node_modules/ansi-regex/package.json b/node_modules/ava/node_modules/ansi-regex/package.json
deleted file mode 100644
index e94852fd7..000000000
--- a/node_modules/ava/node_modules/ansi-regex/package.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "name": "ansi-regex",
- "version": "3.0.0",
- "description": "Regular expression for matching ANSI escape codes",
- "license": "MIT",
- "repository": "chalk/ansi-regex",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava",
- "view-supported": "node fixtures/view-codes.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "cli",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "command-line",
- "text",
- "regex",
- "regexp",
- "re",
- "match",
- "test",
- "find",
- "pattern"
- ],
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- }
-}
diff --git a/node_modules/ava/node_modules/ansi-regex/readme.md b/node_modules/ava/node_modules/ansi-regex/readme.md
deleted file mode 100644
index 22db1c340..000000000
--- a/node_modules/ava/node_modules/ansi-regex/readme.md
+++ /dev/null
@@ -1,46 +0,0 @@
-# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex)
-
-> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install ansi-regex
-```
-
-
-## Usage
-
-```js
-const ansiRegex = require('ansi-regex');
-
-ansiRegex().test('\u001B[4mcake\u001B[0m');
-//=> true
-
-ansiRegex().test('cake');
-//=> false
-
-'\u001B[4mcake\u001B[0m'.match(ansiRegex());
-//=> ['\u001B[4m', '\u001B[0m']
-```
-
-
-## FAQ
-
-### Why do you test for codes not in the ECMA 48 standard?
-
-Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
-
-On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
-
-
-## Maintainers
-
-- [Sindre Sorhus](https://github.com/sindresorhus)
-- [Josh Junon](https://github.com/qix-)
-
-
-## License
-
-MIT
diff --git a/node_modules/ava/node_modules/debug/CHANGELOG.md b/node_modules/ava/node_modules/debug/CHANGELOG.md
deleted file mode 100644
index 820d21e33..000000000
--- a/node_modules/ava/node_modules/debug/CHANGELOG.md
+++ /dev/null
@@ -1,395 +0,0 @@
-
-3.1.0 / 2017-09-26
-==================
-
- * Add `DEBUG_HIDE_DATE` env var (#486)
- * Remove ReDoS regexp in %o formatter (#504)
- * Remove "component" from package.json
- * Remove `component.json`
- * Ignore package-lock.json
- * Examples: fix colors printout
- * Fix: browser detection
- * Fix: spelling mistake (#496, @EdwardBetts)
-
-3.0.1 / 2017-08-24
-==================
-
- * Fix: Disable colors in Edge and Internet Explorer (#489)
-
-3.0.0 / 2017-08-08
-==================
-
- * Breaking: Remove DEBUG_FD (#406)
- * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
- * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
- * Addition: document `enabled` flag (#465)
- * Addition: add 256 colors mode (#481)
- * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
- * Update: component: update "ms" to v2.0.0
- * Update: separate the Node and Browser tests in Travis-CI
- * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
- * Update: separate Node.js and web browser examples for organization
- * Update: update "browserify" to v14.4.0
- * Fix: fix Readme typo (#473)
-
-2.6.9 / 2017-09-22
-==================
-
- * remove ReDoS regexp in %o formatter (#504)
-
-2.6.8 / 2017-05-18
-==================
-
- * Fix: Check for undefined on browser globals (#462, @marbemac)
-
-2.6.7 / 2017-05-16
-==================
-
- * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
- * Fix: Inline extend function in node implementation (#452, @dougwilson)
- * Docs: Fix typo (#455, @msasad)
-
-2.6.5 / 2017-04-27
-==================
-
- * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
- * Misc: clean up browser reference checks (#447, @thebigredgeek)
- * Misc: add npm-debug.log to .gitignore (@thebigredgeek)
-
-
-2.6.4 / 2017-04-20
-==================
-
- * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
- * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
- * Misc: update "ms" to v0.7.3 (@tootallnate)
-
-2.6.3 / 2017-03-13
-==================
-
- * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
- * Docs: Changelog fix (@thebigredgeek)
-
-2.6.2 / 2017-03-10
-==================
-
- * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
- * Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
- * Docs: Add Slackin invite badge (@tootallnate)
-
-2.6.1 / 2017-02-10
-==================
-
- * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
- * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
- * Fix: IE8 "Expected identifier" error (#414, @vgoma)
- * Fix: Namespaces would not disable once enabled (#409, @musikov)
-
-2.6.0 / 2016-12-28
-==================
-
- * Fix: added better null pointer checks for browser useColors (@thebigredgeek)
- * Improvement: removed explicit `window.debug` export (#404, @tootallnate)
- * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
-
-2.5.2 / 2016-12-25
-==================
-
- * Fix: reference error on window within webworkers (#393, @KlausTrainer)
- * Docs: fixed README typo (#391, @lurch)
- * Docs: added notice about v3 api discussion (@thebigredgeek)
-
-2.5.1 / 2016-12-20
-==================
-
- * Fix: babel-core compatibility
-
-2.5.0 / 2016-12-20
-==================
-
- * Fix: wrong reference in bower file (@thebigredgeek)
- * Fix: webworker compatibility (@thebigredgeek)
- * Fix: output formatting issue (#388, @kribblo)
- * Fix: babel-loader compatibility (#383, @escwald)
- * Misc: removed built asset from repo and publications (@thebigredgeek)
- * Misc: moved source files to /src (#378, @yamikuronue)
- * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
- * Test: coveralls integration (#378, @yamikuronue)
- * Docs: simplified language in the opening paragraph (#373, @yamikuronue)
-
-2.4.5 / 2016-12-17
-==================
-
- * Fix: `navigator` undefined in Rhino (#376, @jochenberger)
- * Fix: custom log function (#379, @hsiliev)
- * Improvement: bit of cleanup + linting fixes (@thebigredgeek)
- * Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
- * Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
-
-2.4.4 / 2016-12-14
-==================
-
- * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
-
-2.4.3 / 2016-12-14
-==================
-
- * Fix: navigation.userAgent error for react native (#364, @escwald)
-
-2.4.2 / 2016-12-14
-==================
-
- * Fix: browser colors (#367, @tootallnate)
- * Misc: travis ci integration (@thebigredgeek)
- * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
-
-2.4.1 / 2016-12-13
-==================
-
- * Fix: typo that broke the package (#356)
-
-2.4.0 / 2016-12-13
-==================
-
- * Fix: bower.json references unbuilt src entry point (#342, @justmatt)
- * Fix: revert "handle regex special characters" (@tootallnate)
- * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
- * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
- * Improvement: allow colors in workers (#335, @botverse)
- * Improvement: use same color for same namespace. (#338, @lchenay)
-
-2.3.3 / 2016-11-09
-==================
-
- * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
- * Fix: Returning `localStorage` saved values (#331, Levi Thomason)
- * Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
-
-2.3.2 / 2016-11-09
-==================
-
- * Fix: be super-safe in index.js as well (@TooTallNate)
- * Fix: should check whether process exists (Tom Newby)
-
-2.3.1 / 2016-11-09
-==================
-
- * Fix: Added electron compatibility (#324, @paulcbetts)
- * Improvement: Added performance optimizations (@tootallnate)
- * Readme: Corrected PowerShell environment variable example (#252, @gimre)
- * Misc: Removed yarn lock file from source control (#321, @fengmk2)
-
-2.3.0 / 2016-11-07
-==================
-
- * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
- * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
- * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
- * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
- * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
- * Package: Update "ms" to 0.7.2 (#315, @DevSide)
- * Package: removed superfluous version property from bower.json (#207 @kkirsche)
- * Readme: fix USE_COLORS to DEBUG_COLORS
- * Readme: Doc fixes for format string sugar (#269, @mlucool)
- * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
- * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
- * Readme: better docs for browser support (#224, @matthewmueller)
- * Tooling: Added yarn integration for development (#317, @thebigredgeek)
- * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
- * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
- * Misc: Updated contributors (@thebigredgeek)
-
-2.2.0 / 2015-05-09
-==================
-
- * package: update "ms" to v0.7.1 (#202, @dougwilson)
- * README: add logging to file example (#193, @DanielOchoa)
- * README: fixed a typo (#191, @amir-s)
- * browser: expose `storage` (#190, @stephenmathieson)
- * Makefile: add a `distclean` target (#189, @stephenmathieson)
-
-2.1.3 / 2015-03-13
-==================
-
- * Updated stdout/stderr example (#186)
- * Updated example/stdout.js to match debug current behaviour
- * Renamed example/stderr.js to stdout.js
- * Update Readme.md (#184)
- * replace high intensity foreground color for bold (#182, #183)
-
-2.1.2 / 2015-03-01
-==================
-
- * dist: recompile
- * update "ms" to v0.7.0
- * package: update "browserify" to v9.0.3
- * component: fix "ms.js" repo location
- * changed bower package name
- * updated documentation about using debug in a browser
- * fix: security error on safari (#167, #168, @yields)
-
-2.1.1 / 2014-12-29
-==================
-
- * browser: use `typeof` to check for `console` existence
- * browser: check for `console.log` truthiness (fix IE 8/9)
- * browser: add support for Chrome apps
- * Readme: added Windows usage remarks
- * Add `bower.json` to properly support bower install
-
-2.1.0 / 2014-10-15
-==================
-
- * node: implement `DEBUG_FD` env variable support
- * package: update "browserify" to v6.1.0
- * package: add "license" field to package.json (#135, @panuhorsmalahti)
-
-2.0.0 / 2014-09-01
-==================
-
- * package: update "browserify" to v5.11.0
- * node: use stderr rather than stdout for logging (#29, @stephenmathieson)
-
-1.0.4 / 2014-07-15
-==================
-
- * dist: recompile
- * example: remove `console.info()` log usage
- * example: add "Content-Type" UTF-8 header to browser example
- * browser: place %c marker after the space character
- * browser: reset the "content" color via `color: inherit`
- * browser: add colors support for Firefox >= v31
- * debug: prefer an instance `log()` function over the global one (#119)
- * Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
-
-1.0.3 / 2014-07-09
-==================
-
- * Add support for multiple wildcards in namespaces (#122, @seegno)
- * browser: fix lint
-
-1.0.2 / 2014-06-10
-==================
-
- * browser: update color palette (#113, @gscottolson)
- * common: make console logging function configurable (#108, @timoxley)
- * node: fix %o colors on old node <= 0.8.x
- * Makefile: find node path using shell/which (#109, @timoxley)
-
-1.0.1 / 2014-06-06
-==================
-
- * browser: use `removeItem()` to clear localStorage
- * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
- * package: add "contributors" section
- * node: fix comment typo
- * README: list authors
-
-1.0.0 / 2014-06-04
-==================
-
- * make ms diff be global, not be scope
- * debug: ignore empty strings in enable()
- * node: make DEBUG_COLORS able to disable coloring
- * *: export the `colors` array
- * npmignore: don't publish the `dist` dir
- * Makefile: refactor to use browserify
- * package: add "browserify" as a dev dependency
- * Readme: add Web Inspector Colors section
- * node: reset terminal color for the debug content
- * node: map "%o" to `util.inspect()`
- * browser: map "%j" to `JSON.stringify()`
- * debug: add custom "formatters"
- * debug: use "ms" module for humanizing the diff
- * Readme: add "bash" syntax highlighting
- * browser: add Firebug color support
- * browser: add colors for WebKit browsers
- * node: apply log to `console`
- * rewrite: abstract common logic for Node & browsers
- * add .jshintrc file
-
-0.8.1 / 2014-04-14
-==================
-
- * package: re-add the "component" section
-
-0.8.0 / 2014-03-30
-==================
-
- * add `enable()` method for nodejs. Closes #27
- * change from stderr to stdout
- * remove unnecessary index.js file
-
-0.7.4 / 2013-11-13
-==================
-
- * remove "browserify" key from package.json (fixes something in browserify)
-
-0.7.3 / 2013-10-30
-==================
-
- * fix: catch localStorage security error when cookies are blocked (Chrome)
- * add debug(err) support. Closes #46
- * add .browser prop to package.json. Closes #42
-
-0.7.2 / 2013-02-06
-==================
-
- * fix package.json
- * fix: Mobile Safari (private mode) is broken with debug
- * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
-
-0.7.1 / 2013-02-05
-==================
-
- * add repository URL to package.json
- * add DEBUG_COLORED to force colored output
- * add browserify support
- * fix component. Closes #24
-
-0.7.0 / 2012-05-04
-==================
-
- * Added .component to package.json
- * Added debug.component.js build
-
-0.6.0 / 2012-03-16
-==================
-
- * Added support for "-" prefix in DEBUG [Vinay Pulim]
- * Added `.enabled` flag to the node version [TooTallNate]
-
-0.5.0 / 2012-02-02
-==================
-
- * Added: humanize diffs. Closes #8
- * Added `debug.disable()` to the CS variant
- * Removed padding. Closes #10
- * Fixed: persist client-side variant again. Closes #9
-
-0.4.0 / 2012-02-01
-==================
-
- * Added browser variant support for older browsers [TooTallNate]
- * Added `debug.enable('project:*')` to browser variant [TooTallNate]
- * Added padding to diff (moved it to the right)
-
-0.3.0 / 2012-01-26
-==================
-
- * Added millisecond diff when isatty, otherwise UTC string
-
-0.2.0 / 2012-01-22
-==================
-
- * Added wildcard support
-
-0.1.0 / 2011-12-02
-==================
-
- * Added: remove colors unless stderr isatty [TooTallNate]
-
-0.0.1 / 2010-01-03
-==================
-
- * Initial release
diff --git a/node_modules/ava/node_modules/debug/LICENSE b/node_modules/ava/node_modules/debug/LICENSE
deleted file mode 100644
index 658c933d2..000000000
--- a/node_modules/ava/node_modules/debug/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software
-and associated documentation files (the 'Software'), to deal in the Software without restriction,
-including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
diff --git a/node_modules/ava/node_modules/debug/README.md b/node_modules/ava/node_modules/debug/README.md
deleted file mode 100644
index 0ee7634dd..000000000
--- a/node_modules/ava/node_modules/debug/README.md
+++ /dev/null
@@ -1,437 +0,0 @@
-# debug
-[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
-[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
-
-<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
-
-A tiny JavaScript debugging utility modelled after Node.js core's debugging
-technique. Works in Node.js and web browsers.
-
-## Installation
-
-```bash
-$ npm install debug
-```
-
-## Usage
-
-`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
-
-Example [_app.js_](./examples/node/app.js):
-
-```js
-var debug = require('debug')('http')
- , http = require('http')
- , name = 'My App';
-
-// fake app
-
-debug('booting %o', name);
-
-http.createServer(function(req, res){
- debug(req.method + ' ' + req.url);
- res.end('hello\n');
-}).listen(3000, function(){
- debug('listening');
-});
-
-// fake worker of some kind
-
-require('./worker');
-```
-
-Example [_worker.js_](./examples/node/worker.js):
-
-```js
-var a = require('debug')('worker:a')
- , b = require('debug')('worker:b');
-
-function work() {
- a('doing lots of uninteresting work');
- setTimeout(work, Math.random() * 1000);
-}
-
-work();
-
-function workb() {
- b('doing some work');
- setTimeout(workb, Math.random() * 2000);
-}
-
-workb();
-```
-
-The `DEBUG` environment variable is then used to enable these based on space or
-comma-delimited names.
-
-Here are some examples:
-
-<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
-<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
-<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
-
-#### Windows command prompt notes
-
-##### CMD
-
-On Windows the environment variable is set using the `set` command.
-
-```cmd
-set DEBUG=*,-not_this
-```
-
-Example:
-
-```cmd
-set DEBUG=* & node app.js
-```
-
-##### PowerShell (VS Code default)
-
-PowerShell uses different syntax to set environment variables.
-
-```cmd
-$env:DEBUG = "*,-not_this"
-```
-
-Example:
-
-```cmd
-$env:DEBUG='app';node app.js
-```
-
-Then, run the program to be debugged as usual.
-
-npm script example:
-```js
- "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
-```
-
-## Namespace Colors
-
-Every debug instance has a color generated for it based on its namespace name.
-This helps when visually parsing the debug output to identify which debug instance
-a debug line belongs to.
-
-#### Node.js
-
-In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
-the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
-otherwise debug will only use a small handful of basic colors.
-
-<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
-
-#### Web Browser
-
-Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
-option. These are WebKit web inspectors, Firefox ([since version
-31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
-and the Firebug plugin for Firefox (any version).
-
-<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
-
-
-## Millisecond diff
-
-When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
-
-<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
-
-When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
-
-<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
-
-
-## Conventions
-
-If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
-
-## Wildcards
-
-The `*` character may be used as a wildcard. Suppose for example your library has
-debuggers named "connect:bodyParser", "connect:compress", "connect:session",
-instead of listing all three with
-`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
-`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
-
-You can also exclude specific debuggers by prefixing them with a "-" character.
-For example, `DEBUG=*,-connect:*` would include all debuggers except those
-starting with "connect:".
-
-## Environment Variables
-
-When running through Node.js, you can set a few environment variables that will
-change the behavior of the debug logging:
-
-| Name | Purpose |
-|-----------|-------------------------------------------------|
-| `DEBUG` | Enables/disables specific debugging namespaces. |
-| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
-| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
-| `DEBUG_DEPTH` | Object inspection depth. |
-| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
-
-
-__Note:__ The environment variables beginning with `DEBUG_` end up being
-converted into an Options object that gets used with `%o`/`%O` formatters.
-See the Node.js documentation for
-[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
-for the complete list.
-
-## Formatters
-
-Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
-Below are the officially supported formatters:
-
-| Formatter | Representation |
-|-----------|----------------|
-| `%O` | Pretty-print an Object on multiple lines. |
-| `%o` | Pretty-print an Object all on a single line. |
-| `%s` | String. |
-| `%d` | Number (both integer and float). |
-| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
-| `%%` | Single percent sign ('%'). This does not consume an argument. |
-
-
-### Custom formatters
-
-You can add custom formatters by extending the `debug.formatters` object.
-For example, if you wanted to add support for rendering a Buffer as hex with
-`%h`, you could do something like:
-
-```js
-const createDebug = require('debug')
-createDebug.formatters.h = (v) => {
- return v.toString('hex')
-}
-
-// …elsewhere
-const debug = createDebug('foo')
-debug('this is hex: %h', new Buffer('hello world'))
-// foo this is hex: 68656c6c6f20776f726c6421 +0ms
-```
-
-
-## Browser Support
-
-You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
-or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
-if you don't want to build it yourself.
-
-Debug's enable state is currently persisted by `localStorage`.
-Consider the situation shown below where you have `worker:a` and `worker:b`,
-and wish to debug both. You can enable this using `localStorage.debug`:
-
-```js
-localStorage.debug = 'worker:*'
-```
-
-And then refresh the page.
-
-```js
-a = debug('worker:a');
-b = debug('worker:b');
-
-setInterval(function(){
- a('doing some work');
-}, 1000);
-
-setInterval(function(){
- b('doing some work');
-}, 1200);
-```
-
-
-## Output streams
-
- By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
-
-Example [_stdout.js_](./examples/node/stdout.js):
-
-```js
-var debug = require('debug');
-var error = debug('app:error');
-
-// by default stderr is used
-error('goes to stderr!');
-
-var log = debug('app:log');
-// set this namespace to log via console.log
-log.log = console.log.bind(console); // don't forget to bind to console!
-log('goes to stdout');
-error('still goes to stderr!');
-
-// set all output to go via console.info
-// overrides all per-namespace log settings
-debug.log = console.info.bind(console);
-error('now goes to stdout via console.info');
-log('still goes to stdout, but via console.info now');
-```
-
-## Extend
-You can simply extend debugger
-```js
-const log = require('debug')('auth');
-
-//creates new debug instance with extended namespace
-const logSign = log.extend('sign');
-const logLogin = log.extend('login');
-
-log('hello'); // auth hello
-logSign('hello'); //auth:sign hello
-logLogin('hello'); //auth:login hello
-```
-
-## Set dynamically
-
-You can also enable debug dynamically by calling the `enable()` method :
-
-```js
-let debug = require('debug');
-
-console.log(1, debug.enabled('test'));
-
-debug.enable('test');
-console.log(2, debug.enabled('test'));
-
-debug.disable();
-console.log(3, debug.enabled('test'));
-
-```
-
-print :
-```
-1 false
-2 true
-3 false
-```
-
-Usage :
-`enable(namespaces)`
-`namespaces` can include modes separated by a colon and wildcards.
-
-Note that calling `enable()` completely overrides previously set DEBUG variable :
-
-```
-$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
-=> false
-```
-
-## Checking whether a debug target is enabled
-
-After you've created a debug instance, you can determine whether or not it is
-enabled by checking the `enabled` property:
-
-```javascript
-const debug = require('debug')('http');
-
-if (debug.enabled) {
- // do stuff...
-}
-```
-
-You can also manually toggle this property to force the debug instance to be
-enabled or disabled.
-
-
-## Authors
-
- - TJ Holowaychuk
- - Nathan Rajlich
- - Andrew Rhyne
-
-## Backers
-
-Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
-
-<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
-
-
-## Sponsors
-
-Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
-
-<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
-
-## License
-
-(The MIT License)
-
-Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/ava/node_modules/debug/node.js b/node_modules/ava/node_modules/debug/node.js
deleted file mode 100644
index 7fc36fe6d..000000000
--- a/node_modules/ava/node_modules/debug/node.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./src/node');
diff --git a/node_modules/ava/node_modules/debug/package.json b/node_modules/ava/node_modules/debug/package.json
deleted file mode 100644
index 5bc197ca0..000000000
--- a/node_modules/ava/node_modules/debug/package.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "debug",
- "version": "3.2.5",
- "repository": {
- "type": "git",
- "url": "git://github.com/visionmedia/debug.git"
- },
- "description": "small debugging utility",
- "keywords": [
- "debug",
- "log",
- "debugger"
- ],
- "files": [
- "src",
- "node.js",
- "dist/debug.js",
- "LICENSE",
- "README.md"
- ],
- "author": "TJ Holowaychuk <tj@vision-media.ca>",
- "contributors": [
- "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
- "Andrew Rhyne <rhyneandrew@gmail.com>"
- ],
- "license": "MIT",
- "dependencies": {
- "ms": "^2.1.1"
- },
- "devDependencies": {
- "@babel/cli": "^7.0.0",
- "@babel/core": "^7.0.0",
- "@babel/preset-env": "^7.0.0",
- "browserify": "14.4.0",
- "chai": "^3.5.0",
- "concurrently": "^3.1.0",
- "coveralls": "^3.0.2",
- "istanbul": "^0.4.5",
- "karma": "^3.0.0",
- "karma-chai": "^0.1.0",
- "karma-mocha": "^1.3.0",
- "karma-phantomjs-launcher": "^1.0.2",
- "mocha": "^5.2.0",
- "mocha-lcov-reporter": "^1.2.0",
- "rimraf": "^2.5.4",
- "xo": "^0.23.0"
- },
- "main": "./src/index.js",
- "browser": "./src/browser.js",
- "unpkg": "./dist/debug.js"
-}
diff --git a/node_modules/ava/node_modules/debug/src/browser.js b/node_modules/ava/node_modules/debug/src/browser.js
deleted file mode 100644
index c924b0ac4..000000000
--- a/node_modules/ava/node_modules/debug/src/browser.js
+++ /dev/null
@@ -1,180 +0,0 @@
-"use strict";
-
-function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
-
-/* eslint-env browser */
-
-/**
- * This is the web browser implementation of `debug()`.
- */
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.storage = localstorage();
-/**
- * Colors.
- */
-
-exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
-/**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
-// eslint-disable-next-line complexity
-
-function useColors() {
- // NB: In an Electron preload script, document will be defined but not fully
- // initialized. Since we know we're in Chrome, we'll just detect this case
- // explicitly
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
- return true;
- } // Internet Explorer and Edge do not support colors.
-
-
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
- return false;
- } // Is webkit? http://stackoverflow.com/a/16459606/376773
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
-
-
- return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
- typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
- typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
-}
-/**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
-
-
-function formatArgs(args) {
- args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
-
- if (!this.useColors) {
- return;
- }
-
- var c = 'color: ' + this.color;
- args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
- // arguments passed either before or after the %c, so we need to
- // figure out the correct index to insert the CSS into
-
- var index = 0;
- var lastC = 0;
- args[0].replace(/%[a-zA-Z%]/g, function (match) {
- if (match === '%%') {
- return;
- }
-
- index++;
-
- if (match === '%c') {
- // We only are interested in the *last* %c
- // (the user may have provided their own)
- lastC = index;
- }
- });
- args.splice(lastC, 0, c);
-}
-/**
- * Invokes `console.log()` when available.
- * No-op when `console.log` is not a "function".
- *
- * @api public
- */
-
-
-function log() {
- var _console;
-
- // This hackery is required for IE8/9, where
- // the `console.log` function doesn't have 'apply'
- return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
-}
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-
-
-function save(namespaces) {
- try {
- if (namespaces) {
- exports.storage.setItem('debug', namespaces);
- } else {
- exports.storage.removeItem('debug');
- }
- } catch (error) {// Swallow
- // XXX (@Qix-) should we be logging these?
- }
-}
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-
-function load() {
- var r;
-
- try {
- r = exports.storage.getItem('debug');
- } catch (error) {} // Swallow
- // XXX (@Qix-) should we be logging these?
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
-
-
- if (!r && typeof process !== 'undefined' && 'env' in process) {
- r = process.env.DEBUG;
- }
-
- return r;
-}
-/**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
-
-
-function localstorage() {
- try {
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
- // The Browser also has localStorage in the global context.
- return localStorage;
- } catch (error) {// Swallow
- // XXX (@Qix-) should we be logging these?
- }
-}
-
-module.exports = require('./common')(exports);
-var formatters = module.exports.formatters;
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
-formatters.j = function (v) {
- try {
- return JSON.stringify(v);
- } catch (error) {
- return '[UnexpectedJSONParseError]: ' + error.message;
- }
-};
-
diff --git a/node_modules/ava/node_modules/debug/src/index.js b/node_modules/ava/node_modules/debug/src/index.js
deleted file mode 100644
index 021731593..000000000
--- a/node_modules/ava/node_modules/debug/src/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-"use strict";
-
-/**
- * Detect Electron renderer / nwjs process, which is node, but we should
- * treat as a browser.
- */
-if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
- module.exports = require('./browser.js');
-} else {
- module.exports = require('./node.js');
-}
-
diff --git a/node_modules/ava/node_modules/debug/src/node.js b/node_modules/ava/node_modules/debug/src/node.js
deleted file mode 100644
index dbbb5f108..000000000
--- a/node_modules/ava/node_modules/debug/src/node.js
+++ /dev/null
@@ -1,174 +0,0 @@
-"use strict";
-
-/**
- * Module dependencies.
- */
-var tty = require('tty');
-
-var util = require('util');
-/**
- * This is the Node.js implementation of `debug()`.
- */
-
-
-exports.init = init;
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-/**
- * Colors.
- */
-
-exports.colors = [6, 2, 3, 4, 5, 1];
-
-try {
- // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
- // eslint-disable-next-line import/no-extraneous-dependencies
- var supportsColor = require('supports-color');
-
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
- exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
- }
-} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
-
-/**
- * Build up the default `inspectOpts` object from the environment variables.
- *
- * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
- */
-
-
-exports.inspectOpts = Object.keys(process.env).filter(function (key) {
- return /^debug_/i.test(key);
-}).reduce(function (obj, key) {
- // Camel-case
- var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
- return k.toUpperCase();
- }); // Coerce string value into JS value
-
- var val = process.env[key];
-
- if (/^(yes|on|true|enabled)$/i.test(val)) {
- val = true;
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
- val = false;
- } else if (val === 'null') {
- val = null;
- } else {
- val = Number(val);
- }
-
- obj[prop] = val;
- return obj;
-}, {});
-/**
- * Is stdout a TTY? Colored output is enabled when `true`.
- */
-
-function useColors() {
- return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
-}
-/**
- * Adds ANSI color escape codes if enabled.
- *
- * @api public
- */
-
-
-function formatArgs(args) {
- var name = this.namespace,
- useColors = this.useColors;
-
- if (useColors) {
- var c = this.color;
- var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
- var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
- args[0] = prefix + args[0].split('\n').join('\n' + prefix);
- args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
- } else {
- args[0] = getDate() + name + ' ' + args[0];
- }
-}
-
-function getDate() {
- if (exports.inspectOpts.hideDate) {
- return '';
- }
-
- return new Date().toISOString() + ' ';
-}
-/**
- * Invokes `util.format()` with the specified arguments and writes to stderr.
- */
-
-
-function log() {
- return process.stderr.write(util.format.apply(util, arguments) + '\n');
-}
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-
-
-function save(namespaces) {
- if (namespaces) {
- process.env.DEBUG = namespaces;
- } else {
- // If you set a process.env field to null or undefined, it gets cast to the
- // string 'null' or 'undefined'. Just delete instead.
- delete process.env.DEBUG;
- }
-}
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-
-function load() {
- return process.env.DEBUG;
-}
-/**
- * Init logic for `debug` instances.
- *
- * Create a new `inspectOpts` object in case `useColors` is set
- * differently for a particular `debug` instance.
- */
-
-
-function init(debug) {
- debug.inspectOpts = {};
- var keys = Object.keys(exports.inspectOpts);
-
- for (var i = 0; i < keys.length; i++) {
- debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
- }
-}
-
-module.exports = require('./common')(exports);
-var formatters = module.exports.formatters;
-/**
- * Map %o to `util.inspect()`, all on a single line.
- */
-
-formatters.o = function (v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' ');
-};
-/**
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
- */
-
-
-formatters.O = function (v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts);
-};
-
diff --git a/node_modules/ava/node_modules/ms/index.js b/node_modules/ava/node_modules/ms/index.js
deleted file mode 100644
index 72297501f..000000000
--- a/node_modules/ava/node_modules/ms/index.js
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * Helpers.
- */
-
-var s = 1000;
-var m = s * 60;
-var h = m * 60;
-var d = h * 24;
-var w = d * 7;
-var y = d * 365.25;
-
-/**
- * Parse or format the given `val`.
- *
- * Options:
- *
- * - `long` verbose formatting [false]
- *
- * @param {String|Number} val
- * @param {Object} [options]
- * @throws {Error} throw an error if val is not a non-empty string or a number
- * @return {String|Number}
- * @api public
- */
-
-module.exports = function(val, options) {
- options = options || {};
- var type = typeof val;
- if (type === 'string' && val.length > 0) {
- return parse(val);
- } else if (type === 'number' && isNaN(val) === false) {
- return options.long ? fmtLong(val) : fmtShort(val);
- }
- throw new Error(
- 'val is not a non-empty string or a valid number. val=' +
- JSON.stringify(val)
- );
-};
-
-/**
- * Parse the given `str` and return milliseconds.
- *
- * @param {String} str
- * @return {Number}
- * @api private
- */
-
-function parse(str) {
- str = String(str);
- if (str.length > 100) {
- return;
- }
- var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
- str
- );
- if (!match) {
- return;
- }
- var n = parseFloat(match[1]);
- var type = (match[2] || 'ms').toLowerCase();
- switch (type) {
- case 'years':
- case 'year':
- case 'yrs':
- case 'yr':
- case 'y':
- return n * y;
- case 'weeks':
- case 'week':
- case 'w':
- return n * w;
- case 'days':
- case 'day':
- case 'd':
- return n * d;
- case 'hours':
- case 'hour':
- case 'hrs':
- case 'hr':
- case 'h':
- return n * h;
- case 'minutes':
- case 'minute':
- case 'mins':
- case 'min':
- case 'm':
- return n * m;
- case 'seconds':
- case 'second':
- case 'secs':
- case 'sec':
- case 's':
- return n * s;
- case 'milliseconds':
- case 'millisecond':
- case 'msecs':
- case 'msec':
- case 'ms':
- return n;
- default:
- return undefined;
- }
-}
-
-/**
- * Short format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function fmtShort(ms) {
- var msAbs = Math.abs(ms);
- if (msAbs >= d) {
- return Math.round(ms / d) + 'd';
- }
- if (msAbs >= h) {
- return Math.round(ms / h) + 'h';
- }
- if (msAbs >= m) {
- return Math.round(ms / m) + 'm';
- }
- if (msAbs >= s) {
- return Math.round(ms / s) + 's';
- }
- return ms + 'ms';
-}
-
-/**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function fmtLong(ms) {
- var msAbs = Math.abs(ms);
- if (msAbs >= d) {
- return plural(ms, msAbs, d, 'day');
- }
- if (msAbs >= h) {
- return plural(ms, msAbs, h, 'hour');
- }
- if (msAbs >= m) {
- return plural(ms, msAbs, m, 'minute');
- }
- if (msAbs >= s) {
- return plural(ms, msAbs, s, 'second');
- }
- return ms + ' ms';
-}
-
-/**
- * Pluralization helper.
- */
-
-function plural(ms, msAbs, n, name) {
- var isPlural = msAbs >= n * 1.5;
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
-}
diff --git a/node_modules/ava/node_modules/ms/license.md b/node_modules/ava/node_modules/ms/license.md
deleted file mode 100644
index 69b61253a..000000000
--- a/node_modules/ava/node_modules/ms/license.md
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Zeit, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/ava/node_modules/ms/package.json b/node_modules/ava/node_modules/ms/package.json
deleted file mode 100644
index fc28cb39d..000000000
--- a/node_modules/ava/node_modules/ms/package.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "name": "ms",
- "version": "2.1.1",
- "description": "Tiny millisecond conversion utility",
- "repository": "zeit/ms",
- "main": "./index",
- "files": [
- "index.js"
- ],
- "scripts": {
- "precommit": "lint-staged",
- "lint": "eslint lib/* bin/*",
- "test": "mocha tests.js"
- },
- "eslintConfig": {
- "extends": "eslint:recommended",
- "env": {
- "node": true,
- "es6": true
- }
- },
- "lint-staged": {
- "*.js": [
- "npm run lint",
- "prettier --single-quote --write",
- "git add"
- ]
- },
- "license": "MIT",
- "devDependencies": {
- "eslint": "4.12.1",
- "expect.js": "0.3.1",
- "husky": "0.14.3",
- "lint-staged": "5.0.0",
- "mocha": "4.0.1"
- }
-}
diff --git a/node_modules/ava/node_modules/ms/readme.md b/node_modules/ava/node_modules/ms/readme.md
deleted file mode 100644
index bb767293a..000000000
--- a/node_modules/ava/node_modules/ms/readme.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# ms
-
-[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
-[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
-
-Use this package to easily convert various time formats to milliseconds.
-
-## Examples
-
-```js
-ms('2 days') // 172800000
-ms('1d') // 86400000
-ms('10h') // 36000000
-ms('2.5 hrs') // 9000000
-ms('2h') // 7200000
-ms('1m') // 60000
-ms('5s') // 5000
-ms('1y') // 31557600000
-ms('100') // 100
-ms('-3 days') // -259200000
-ms('-1h') // -3600000
-ms('-200') // -200
-```
-
-### Convert from Milliseconds
-
-```js
-ms(60000) // "1m"
-ms(2 * 60000) // "2m"
-ms(-3 * 60000) // "-3m"
-ms(ms('10 hours')) // "10h"
-```
-
-### Time Format Written-Out
-
-```js
-ms(60000, { long: true }) // "1 minute"
-ms(2 * 60000, { long: true }) // "2 minutes"
-ms(-3 * 60000, { long: true }) // "-3 minutes"
-ms(ms('10 hours'), { long: true }) // "10 hours"
-```
-
-## Features
-
-- Works both in [Node.js](https://nodejs.org) and in the browser
-- If a number is supplied to `ms`, a string with a unit is returned
-- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
-- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
-
-## Related Packages
-
-- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
-
-## Caught a Bug?
-
-1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
-2. Link the package to the global module directory: `npm link`
-3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
-
-As always, you can run the tests using: `npm test`
diff --git a/node_modules/ava/node_modules/strip-ansi/index.js b/node_modules/ava/node_modules/strip-ansi/index.js
deleted file mode 100644
index 96e0292c8..000000000
--- a/node_modules/ava/node_modules/strip-ansi/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-'use strict';
-const ansiRegex = require('ansi-regex');
-
-module.exports = input => typeof input === 'string' ? input.replace(ansiRegex(), '') : input;
diff --git a/node_modules/ava/node_modules/strip-ansi/license b/node_modules/ava/node_modules/strip-ansi/license
deleted file mode 100644
index e7af2f771..000000000
--- a/node_modules/ava/node_modules/strip-ansi/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/ava/node_modules/strip-ansi/package.json b/node_modules/ava/node_modules/strip-ansi/package.json
deleted file mode 100644
index 555f19461..000000000
--- a/node_modules/ava/node_modules/strip-ansi/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "name": "strip-ansi",
- "version": "4.0.0",
- "description": "Strip ANSI escape codes",
- "license": "MIT",
- "repository": "chalk/strip-ansi",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "test": "xo && ava"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "strip",
- "trim",
- "remove",
- "ansi",
- "styles",
- "color",
- "colour",
- "colors",
- "terminal",
- "console",
- "string",
- "tty",
- "escape",
- "formatting",
- "rgb",
- "256",
- "shell",
- "xterm",
- "log",
- "logging",
- "command-line",
- "text"
- ],
- "dependencies": {
- "ansi-regex": "^3.0.0"
- },
- "devDependencies": {
- "ava": "*",
- "xo": "*"
- }
-}
diff --git a/node_modules/ava/node_modules/strip-ansi/readme.md b/node_modules/ava/node_modules/strip-ansi/readme.md
deleted file mode 100644
index dc76f0cb1..000000000
--- a/node_modules/ava/node_modules/strip-ansi/readme.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# strip-ansi [![Build Status](https://travis-ci.org/chalk/strip-ansi.svg?branch=master)](https://travis-ci.org/chalk/strip-ansi)
-
-> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
-
-
-## Install
-
-```
-$ npm install strip-ansi
-```
-
-
-## Usage
-
-```js
-const stripAnsi = require('strip-ansi');
-
-stripAnsi('\u001B[4mUnicorn\u001B[0m');
-//=> 'Unicorn'
-```
-
-
-## Related
-
-- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
-- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
-- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
-- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
-
-
-## Maintainers
-
-- [Sindre Sorhus](https://github.com/sindresorhus)
-- [Josh Junon](https://github.com/qix-)
-
-
-## License
-
-MIT
diff --git a/node_modules/ava/package.json b/node_modules/ava/package.json
deleted file mode 100644
index ffc722117..000000000
--- a/node_modules/ava/package.json
+++ /dev/null
@@ -1,192 +0,0 @@
-{
- "name": "ava",
- "version": "0.24.0",
- "description": "Futuristic test runner 🚀",
- "license": "MIT",
- "repository": "avajs/ava",
- "homepage": "https://ava.li",
- "bin": "cli.js",
- "engines": {
- "node": ">=4"
- },
- "scripts": {
- "lint": "xo && (cd test/fixture && xo '**' '!{source-map-initial,syntax-error}.js' '!snapshots/test-sourcemaps/build/**') && lock-verify",
- "test": "npm run lint && flow check test/flow-types && tsc -p test/ts-types && nyc tap --no-cov --timeout=300 --jobs=4 test/*.js test/reporters/*.js",
- "test-win": "tap --no-cov --reporter=classic --timeout=300 --jobs=4 test/*.js test/reporters/*.js",
- "visual": "node test/visual/run-visual-tests.js",
- "prepublish": "npm run make-ts",
- "make-ts": "node types/make.js"
- },
- "files": [
- "lib",
- "*.js",
- "*.js.flow",
- "types/generated.d.ts"
- ],
- "keywords": [
- "🦄",
- "test",
- "runner",
- "testing",
- "ava",
- "concurrent",
- "parallel",
- "fast",
- "tdd",
- "cli-app",
- "cli",
- "jest",
- "mocha",
- "tape",
- "tap",
- "qunit",
- "jasmine",
- "babel",
- "assert",
- "assertion",
- "promise",
- "promises",
- "async",
- "function",
- "await",
- "generator",
- "generators",
- "yield",
- "observable",
- "observables",
- "unit",
- "snapshot",
- "expect",
- "typescript",
- "flow"
- ],
- "dependencies": {
- "@ava/babel-preset-stage-4": "^1.1.0",
- "@ava/babel-preset-transform-test-files": "^3.0.0",
- "@ava/write-file-atomic": "^2.2.0",
- "@concordance/react": "^1.0.0",
- "ansi-escapes": "^3.0.0",
- "ansi-styles": "^3.1.0",
- "arr-flatten": "^1.0.1",
- "array-union": "^1.0.1",
- "array-uniq": "^1.0.2",
- "arrify": "^1.0.0",
- "auto-bind": "^1.1.0",
- "ava-init": "^0.2.0",
- "babel-core": "^6.17.0",
- "babel-generator": "^6.26.0",
- "babel-plugin-syntax-object-rest-spread": "^6.13.0",
- "bluebird": "^3.0.0",
- "caching-transform": "^1.0.0",
- "chalk": "^2.0.1",
- "chokidar": "^1.4.2",
- "clean-stack": "^1.1.1",
- "clean-yaml-object": "^0.1.0",
- "cli-cursor": "^2.1.0",
- "cli-spinners": "^1.0.0",
- "cli-truncate": "^1.0.0",
- "co-with-promise": "^4.6.0",
- "code-excerpt": "^2.1.0",
- "common-path-prefix": "^1.0.0",
- "concordance": "^3.0.0",
- "convert-source-map": "^1.2.0",
- "core-assert": "^0.2.0",
- "currently-unhandled": "^0.4.1",
- "debug": "^3.0.1",
- "dot-prop": "^4.1.0",
- "empower-core": "^0.6.1",
- "equal-length": "^1.0.0",
- "figures": "^2.0.0",
- "find-cache-dir": "^1.0.0",
- "fn-name": "^2.0.0",
- "get-port": "^3.0.0",
- "globby": "^6.0.0",
- "has-flag": "^2.0.0",
- "hullabaloo-config-manager": "^1.1.0",
- "ignore-by-default": "^1.0.0",
- "import-local": "^0.1.1",
- "indent-string": "^3.0.0",
- "is-ci": "^1.0.7",
- "is-generator-fn": "^1.0.0",
- "is-obj": "^1.0.0",
- "is-observable": "^1.0.0",
- "is-promise": "^2.1.0",
- "js-yaml": "^3.8.2",
- "last-line-stream": "^1.0.0",
- "lodash.clonedeepwith": "^4.5.0",
- "lodash.debounce": "^4.0.3",
- "lodash.difference": "^4.3.0",
- "lodash.flatten": "^4.2.0",
- "loud-rejection": "^1.2.0",
- "make-dir": "^1.0.0",
- "matcher": "^1.0.0",
- "md5-hex": "^2.0.0",
- "meow": "^3.7.0",
- "ms": "^2.0.0",
- "multimatch": "^2.1.0",
- "observable-to-promise": "^0.5.0",
- "option-chain": "^1.0.0",
- "package-hash": "^2.0.0",
- "pkg-conf": "^2.0.0",
- "plur": "^2.0.0",
- "pretty-ms": "^3.0.0",
- "require-precompiled": "^0.1.0",
- "resolve-cwd": "^2.0.0",
- "safe-buffer": "^5.1.1",
- "semver": "^5.4.1",
- "slash": "^1.0.0",
- "source-map-support": "^0.5.0",
- "stack-utils": "^1.0.1",
- "strip-ansi": "^4.0.0",
- "strip-bom-buf": "^1.0.0",
- "supports-color": "^5.0.0",
- "time-require": "^0.1.2",
- "trim-off-newlines": "^1.0.1",
- "unique-temp-dir": "^1.0.0",
- "update-notifier": "^2.3.0"
- },
- "devDependencies": {
- "cli-table2": "^0.2.0",
- "codecov": "^3.0.0",
- "del": "^3.0.0",
- "delay": "^2.0.0",
- "execa": "^0.8.0",
- "flow-bin": "^0.59.0",
- "get-stream": "^3.0.0",
- "git-branch": "^1.0.0",
- "has-ansi": "^3.0.0",
- "inquirer": "^4.0.0",
- "is-array-sorted": "^1.0.0",
- "lock-verify": "^1.1.0",
- "lolex": "^2.1.2",
- "nyc": "^11.0.3",
- "proxyquire": "^1.7.4",
- "react": "^16.1.1",
- "react-test-renderer": "^16.1.1",
- "signal-exit": "^3.0.0",
- "sinon": "^4.1.2",
- "source-map-fixtures": "^2.1.0",
- "tap": "^10.0.0",
- "temp-write": "^3.1.0",
- "touch": "^3.1.0",
- "typescript": "^2.2.2",
- "xo": "^0.18.2",
- "zen-observable": "^0.6.0"
- },
- "typings": "types/generated.d.ts",
- "xo": {
- "ignores": [
- "media/**"
- ],
- "rules": {
- "no-use-extend-native/no-use-extend-native": "off"
- }
- },
- "nyc": {
- "reporter": [
- "html",
- "lcov",
- "text"
- ]
- }
-}
diff --git a/node_modules/ava/profile.js b/node_modules/ava/profile.js
deleted file mode 100644
index 3067e663a..000000000
--- a/node_modules/ava/profile.js
+++ /dev/null
@@ -1,161 +0,0 @@
-'use strict';
-
-// Iron-node does not work with forked processes
-// This cli command will run a single file in the current process.
-// Intended to be used with iron-node for profiling purposes.
-
-const path = require('path');
-const EventEmitter = require('events');
-const meow = require('meow');
-const Promise = require('bluebird');
-const pkgConf = require('pkg-conf');
-const findCacheDir = require('find-cache-dir');
-const uniqueTempDir = require('unique-temp-dir');
-const arrify = require('arrify');
-const resolveCwd = require('resolve-cwd');
-const babelConfigHelper = require('./lib/babel-config');
-const CachingPrecompiler = require('./lib/caching-precompiler');
-const globals = require('./lib/globals');
-
-function resolveModules(modules) {
- return arrify(modules).map(name => {
- const modulePath = resolveCwd.silent(name);
-
- if (modulePath === null) {
- throw new Error(`Could not resolve required module '${name}'`);
- }
-
- return modulePath;
- });
-}
-
-// Chrome gets upset when the `this` value is non-null for these functions
-globals.setTimeout = setTimeout.bind(null);
-globals.clearTimeout = clearTimeout.bind(null);
-
-Promise.longStackTraces();
-
-const conf = pkgConf.sync('ava', {
- defaults: {
- babel: 'default'
- }
-});
-
-// Define a minimal set of options from the main CLI
-const cli = meow(`
- Usage
- $ iron-node node_modules/ava/profile.js <test-file>
-
- Options
- --fail-fast Stop after first test failure
- --serial, -s Run tests serially
-
-`, {
- string: [
- '_'
- ],
- boolean: [
- 'fail-fast',
- 'verbose',
- 'serial',
- 'tap'
- ],
- default: conf,
- alias: {
- s: 'serial'
- }
-});
-
-if (cli.input.length === 0) {
- throw new Error('Specify a test file');
-}
-
-const file = path.resolve(cli.input[0]);
-const cacheDir = findCacheDir({
- name: 'ava',
- files: [file]
-}) || uniqueTempDir();
-
-babelConfigHelper.build(process.cwd(), cacheDir, conf.babel, true)
- .then(result => {
- const precompiler = new CachingPrecompiler({
- path: cacheDir,
- getBabelOptions: result.getOptions,
- babelCacheKeys: result.cacheKeys
- });
-
- const precompiled = {};
- precompiled[file] = precompiler.precompileFile(file);
-
- const opts = {
- file,
- failFast: cli.flags.failFast,
- serial: cli.flags.serial,
- tty: false,
- cacheDir,
- precompiled,
- require: resolveModules(conf.require)
- };
-
- const events = new EventEmitter();
- let uncaughtExceptionCount = 0;
-
- // Mock the behavior of a parent process
- process.channel = {ref() {}, unref() {}};
- process.send = data => {
- if (data && data.ava) {
- const name = data.name.replace(/^ava-/, '');
-
- if (events.listeners(name).length > 0) {
- events.emit(name, data.data);
- } else {
- console.log('UNHANDLED AVA EVENT:', name, data.data);
- }
-
- return;
- }
-
- console.log('NON AVA EVENT:', data);
- };
-
- events.on('test', data => {
- console.log('TEST:', data.title, data.error);
- });
-
- events.on('results', data => {
- if (console.profileEnd) {
- console.profileEnd();
- }
-
- console.log('RESULTS:', data.stats);
-
- if (process.exit) {
- process.exit(data.stats.failCount + uncaughtExceptionCount); // eslint-disable-line unicorn/no-process-exit
- }
- });
-
- events.on('stats', () => {
- setImmediate(() => {
- process.emit('ava-run', {});
- });
- });
-
- events.on('uncaughtException', data => {
- uncaughtExceptionCount++;
- let stack = data && data.exception && data.exception.stack;
- stack = stack || data;
- console.log(stack);
- });
-
- // `test-worker` will read process.argv[2] for options
- process.argv[2] = JSON.stringify(opts);
- process.argv.length = 3;
-
- if (console.profile) {
- console.profile('AVA test-worker process');
- }
-
- setImmediate(() => {
- require('./lib/test-worker'); // eslint-disable-line import/no-unassigned-import
- });
- });
diff --git a/node_modules/ava/readme.md b/node_modules/ava/readme.md
deleted file mode 100644
index 825e83253..000000000
--- a/node_modules/ava/readme.md
+++ /dev/null
@@ -1,1234 +0,0 @@
-# [![AVA](media/header.png)](https://ava.li)
-
-> Futuristic test runner
-
-[![Build Status: Linux](https://travis-ci.org/avajs/ava.svg?branch=master)](https://travis-ci.org/avajs/ava) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/e7v91mu2m5x48ehx/branch/master?svg=true)](https://ci.appveyor.com/project/ava/ava/branch/master) [![Coverage Status](https://coveralls.io/repos/github/avajs/ava/badge.svg?branch=master)](https://coveralls.io/github/avajs/ava?branch=master) [![Dependency Status](https://dependencyci.com/github/avajs/ava/badge)](https://dependencyci.com/github/avajs/ava) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo) [![Gitter](https://badges.gitter.im/join_chat.svg)](https://gitter.im/avajs/ava) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs)
-
-Even though JavaScript is single-threaded, IO in Node.js can happen in parallel due to its async nature. AVA takes advantage of this and runs your tests concurrently, which is especially beneficial for IO heavy tests. In addition, test files are run in parallel as separate processes, giving you even better performance and an isolated environment for each test file. [Switching](https://github.com/sindresorhus/pageres/commit/663be15acb3dd2eb0f71b1956ef28c2cd3fdeed0) from Mocha to AVA in Pageres brought the test time down from 31 to 11 seconds. Having tests run concurrently forces you to write atomic tests, meaning tests don't depend on global state or the state of other tests, which is a great thing!
-
-![](media/mini-reporter.gif)
-
-*Read our [contributing guide](contributing.md) if you're looking to contribute (issues/PRs/etc).*
-
-Follow the [AVA Twitter account](https://twitter.com/ava__js) for updates.
-
-Translations: [Español](https://github.com/avajs/ava-docs/blob/master/es_ES/readme.md), [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/readme.md), [Italiano](https://github.com/avajs/ava-docs/blob/master/it_IT/readme.md), [日本語](https://github.com/avajs/ava-docs/blob/master/ja_JP/readme.md), [한국어](https://github.com/avajs/ava-docs/blob/master/ko_KR/readme.md), [Português](https://github.com/avajs/ava-docs/blob/master/pt_BR/readme.md), [Русский](https://github.com/avajs/ava-docs/blob/master/ru_RU/readme.md), [简体中文](https://github.com/avajs/ava-docs/blob/master/zh_CN/readme.md)
-
-
-## Contents
-
-- [Usage](#usage)
-- [CLI Usage](#cli)
-- [Debugging](#debugging)
-- [Reporters](#reporters)
-- [Configuration](#configuration)
-- [Documentation](#documentation)
-- [API](#api)
-- [Assertions](#assertions)
-- [Snapshot testing](#snapshot-testing)
-- [Tips](#tips)
-- [FAQ](#faq)
-- [Recipes](#recipes)
-- [Support](#support)
-- [Related](#related)
-- [Links](#links)
-- [Team](#team)
-
-
-## Why AVA?
-
-- Minimal and fast
-- Simple test syntax
-- Runs tests concurrently
-- Enforces writing atomic tests
-- No implicit globals
-- Includes TypeScript & Flow type definitions
-- [Magic assert](#magic-assert)
-- [Isolated environment for each test file](#process-isolation)
-- [Write your tests in ES2017](#es2017-support)
-- [Promise support](#promise-support)
-- [Generator function support](#generator-function-support)
-- [Async function support](#async-function-support)
-- [Observable support](#observable-support)
-- [Enhanced assertion messages](#enhanced-assertion-messages)
-- [TAP reporter](#tap-reporter)
-- [Automatic migration from other test runners](https://github.com/avajs/ava-codemods#migrating-to-ava)
-
-
-## Test syntax
-
-```js
-import test from 'ava';
-
-test(t => {
- t.deepEqual([1, 2], [1, 2]);
-});
-```
-
-## Usage
-
-### Add AVA to your project
-
-Install AVA globally and run it with `--init` to add AVA to your `package.json`.
-
-
-```console
-$ npm install --global ava
-$ ava --init
-```
-
-If you prefer using Yarn:
-
-```console
-$ yarn global add ava
-$ ava --init
-```
-
-Your `package.json` will then look like this:
-
-```json
-{
- "name": "awesome-package",
- "scripts": {
- "test": "ava"
- },
- "devDependencies": {
- "ava": "^0.20.0"
- }
-}
-```
-
-Any arguments passed after `--init` are added as config to `package.json`.
-
-#### Manual installation
-
-You can also install AVA directly:
-
-```console
-$ npm install --save-dev ava
-```
-
-Alternatively using Yarn:
-
-```console
-$ yarn add --dev ava
-```
-
-You'll have to configure the `test` script in your `package.json` to use `ava` (see above).
-
-### Create your test file
-
-Create a file named `test.js` in the project root directory:
-
-```js
-import test from 'ava';
-
-test('foo', t => {
- t.pass();
-});
-
-test('bar', async t => {
- const bar = Promise.resolve('bar');
-
- t.is(await bar, 'bar');
-});
-```
-
-### Run it
-
-```console
-$ npm test
-```
-
-### Watch it
-
-```console
-$ npm test -- --watch
-```
-
-AVA comes with an intelligent watch mode. [Learn more in its recipe](docs/recipes/watch-mode.md).
-
-## CLI
-
-```console
-$ ava --help
-
- Usage
- ava [<file|directory|glob> ...]
-
- Options
- --init Add AVA to your project
- --fail-fast Stop after first test failure
- --serial, -s Run tests serially
- --tap, -t Generate TAP output
- --verbose, -v Enable verbose output
- --no-cache Disable the transpiler cache
- --no-power-assert Disable Power Assert
- --color Force color output
- --no-color Disable color output
- --match, -m Only run tests with matching title (Can be repeated)
- --watch, -w Re-run tests when tests and source files change
- --timeout, -T Set global timeout
- --concurrency, -c Max number of test files running at the same time (Default: CPU cores)
- --update-snapshots, -u Update snapshots
-
- Examples
- ava
- ava test.js test2.js
- ava test-*.js
- ava test
- ava --init
- ava --init foo.js
-
- Default patterns when no arguments:
- test.js test-*.js test/**/*.js **/__tests__/**/*.js **/*.test.js
-```
-
-*Note that the CLI will use your local install of AVA when available, even when run globally.*
-
-Directories are recursed, with all `*.js` files being treated as test files. Directories named `fixtures`, `helpers` and `node_modules` are *always* ignored. So are files starting with `_` which allows you to place helpers in the same directory as your test files.
-
-When using `npm test`, you can pass positional arguments directly `npm test test2.js`, but flags needs to be passed like `npm test -- --verbose`.
-
-
-## Debugging
-
-AVA runs tests in child processes, so to debug tests, you need to do this workaround:
-
-```console
-$ node --inspect node_modules/ava/profile.js some/test/file.js
-```
-
-### Debugger-specific tips
-
-- [Chrome DevTools](docs/recipes/debugging-with-chrome-devtools.md)
-- [WebStorm](docs/recipes/debugging-with-webstorm.md)
-- [Visual Studio Code](docs/recipes/debugging-with-vscode.md)
-
-
-## Reporters
-
-### Mini-reporter
-
-The mini-reporter is the default reporter.
-
-<img src="media/mini-reporter.gif" width="460">
-
-### Verbose reporter
-
-Use the `--verbose` flag to enable the verbose reporter. This is always used in CI environments unless the [TAP reporter](#tap-reporter) is enabled.
-
-<img src="media/verbose-reporter.png" width="294">
-
-### TAP reporter
-
-AVA supports the TAP format and thus is compatible with [any TAP reporter](https://github.com/sindresorhus/awesome-tap#reporters). Use the `--tap` flag to enable TAP output.
-
-```console
-$ ava --tap | tap-nyan
-```
-
-<img src="media/tap-reporter.png" width="420">
-
-Please note that the TAP reporter is unavailable when using [watch mode](#watch-it).
-
-### Magic assert
-
-AVA adds code excerpts and clean diffs for actual and expected values. If values in the assertion are objects or arrays, only a diff is displayed, to remove the noise and focus on the problem. The diff is syntax-highlighted too! If you are comparing strings, both single and multi line, AVA displays a different kind of output, highlighting the added or missing characters.
-
-![](media/magic-assert-combined.png)
-
-### Clean stack traces
-
-AVA automatically removes unrelated lines in stack traces, allowing you to find the source of an error much faster, as seen above.
-
-
-## Configuration
-
-All of the CLI options can be configured in the `ava` section of your `package.json`. This allows you to modify the default behavior of the `ava` command, so you don't have to repeatedly type the same options on the command prompt.
-
-```json
-{
- "ava": {
- "files": [
- "my-test-folder/*.js",
- "!**/not-this-file.js"
- ],
- "source": [
- "**/*.{js,jsx}",
- "!dist/**/*"
- ],
- "match": [
- "*oo",
- "!foo"
- ],
- "concurrency": 5,
- "failFast": true,
- "failWithoutAssertions": false,
- "tap": true,
- "powerAssert": false,
- "require": [
- "babel-register"
- ],
- "babel": "inherit"
- }
-}
-```
-
-Arguments passed to the CLI will always take precedence over the configuration in `package.json`.
-
-### Options
-
-- `files`: file & directory paths and glob patterns that select which files AVA will run tests from. Only files with a `.js` extension are used. Files with an underscore prefix are ignored. All `.js` files in selected directories are run
-- `source`: files that, when changed, cause tests to be re-run in watch mode. See the [watch mode recipe for details](https://github.com/avajs/ava/blob/master/docs/recipes/watch-mode.md#source-files-and-test-files)
-- `match`: not typically useful in the `package.json` configuration, but equivalent to [specifying `--match` on the CLI](#running-tests-with-matching-titles)
-- `failFast`: stop running further tests once a test fails
-- `failWithoutAssertions`: if `false`, does not fail a test if it doesn't run [assertions](#assertions)
-- `tap`: if `true`, enables the [TAP reporter](#tap-reporter)
-- `snapshotDir`: specifies a fixed location for storing snapshot files. Use this if your snapshots are ending up in the wrong location
-- `powerAssert`: if `false`, disables [power-assert](https://github.com/power-assert-js/power-assert) which otherwise helps provide more descriptive error messages
-- `require`: extra modules to require before tests are run. Modules are required in the [worker processes](#process-isolation)
-- `babel`: test file specific Babel options. See [ES2017 support](#es2017-support) for more details
-
-Note that providing files on the CLI overrides the `files` option. If you've configured a glob pattern, for instance `test/**/*.test.js`, you may want to repeat it when using the CLI: `ava 'test/integration/*.test.js'`.
-
-## Documentation
-
-Tests are run concurrently. You can specify synchronous and asynchronous tests. Tests are considered synchronous unless you return a promise or [observable](https://github.com/zenparsing/zen-observable).
-
-We *highly* recommend the use of [async functions](#async-function-support). They make asynchronous code concise and readable, and they implicitly return a promise so you don't have to.
-
-If you're unable to use promises or observables, you may enable "callback mode" by defining your test with `test.cb([title], fn)`. Tests declared this way **must** be manually ended with `t.end()`. This mode is mainly intended for testing callback-style APIs. However, we would strongly recommend [promisifying](https://github.com/sindresorhus/pify) callback-style APIs instead of using "callback mode", as this results in more correct and readable tests.
-
-You must define all tests synchronously. They can't be defined inside `setTimeout`, `setImmediate`, etc.
-
-AVA tries to run test files with their current working directory set to the directory that contains your `package.json` file.
-
-### Creating tests
-
-To create a test you call the `test` function you imported from AVA. Provide the optional title and implementation function. The function will be called when your test is run. It's passed an [execution object](#t) as its first argument.
-
-**Note:** In order for the [enhanced assertion messages](#enhanced-assertion-messages) to behave correctly, the first argument **must** be named `t`.
-
-```js
-import test from 'ava';
-
-test('my passing test', t => {
- t.pass();
-});
-```
-
-#### Titles
-
-Titles are optional, meaning you can do:
-
-```js
-test(t => {
- t.pass();
-});
-```
-
-It's recommended to provide test titles if you have more than one test.
-
-If you haven't provided a test title, but the implementation is a named function, that name will be used as the test title:
-
-```js
-test(function name(t) {
- t.pass();
-});
-```
-
-### Assertion planning
-
-Assertion plans ensure tests only pass when a specific number of assertions have been executed. They'll help you catch cases where tests exit too early. They'll also cause tests to fail if too many assertions are executed, which can be useful if you have assertions inside callbacks or loops.
-
-If you do not specify an assertion plan, your test will still fail if no assertions are executed. Set the `failWithoutAssertions` option to `false` in AVA's [`package.json` configuration](#configuration) to disable this behavior.
-
-Note that, unlike [`tap`](https://www.npmjs.com/package/tap) and [`tape`](https://www.npmjs.com/package/tape), AVA does *not* automatically end a test when the planned assertion count is reached.
-
-These examples will result in a passed test:
-
-```js
-test(t => {
- t.plan(1);
-
- return Promise.resolve(3).then(n => {
- t.is(n, 3);
- });
-});
-
-test.cb(t => {
- t.plan(1);
-
- someAsyncFunction(() => {
- t.pass();
- t.end();
- });
-});
-```
-
-These won't:
-
-```js
-test(t => {
- t.plan(2);
-
- for (let i = 0; i < 3; i++) {
- t.true(i < 3);
- }
-}); // Fails, 3 assertions are executed which is too many
-
-test(t => {
- t.plan(1);
-
- someAsyncFunction(() => {
- t.pass();
- });
-}); // Fails, the test ends synchronously before the assertion is executed
-```
-
-### Running tests serially
-
-Tests are run concurrently by default, however, sometimes you have to write tests that cannot run concurrently. In these rare cases you can use the `.serial` modifier. It will force those tests to run serially *before* the concurrent ones.
-
-```js
-test.serial(t => {
- t.pass();
-});
-```
-
-Note that this only applies to tests within a particular test file. AVA will still run multiple tests files at the same time unless you pass the [`--serial` CLI flag](#cli).
-
-### Running specific tests
-
-During development it can be helpful to only run a few specific tests. This can be accomplished using the `.only` modifier:
-
-```js
-test('will not be run', t => {
- t.fail();
-});
-
-test.only('will be run', t => {
- t.pass();
-});
-```
-
-*Note:* The `.only` modifier applies to the test file it's defined in, so if you run multiple test files, tests in other files will still run. If you want to only run the `test.only` test, provide just that test file to AVA.
-
-### Running tests with matching titles
-
-The `--match` flag allows you to run just the tests that have a matching title. This is achieved with simple wildcard patterns. Patterns are case insensitive. See [`matcher`](https://github.com/sindresorhus/matcher) for more details.
-
-Match titles ending with `foo`:
-
-```console
-$ ava --match='*foo'
-```
-
-Match titles starting with `foo`:
-
-```console
-$ ava --match='foo*'
-```
-
-Match titles containing `foo`:
-
-```console
-$ ava --match='*foo*'
-```
-
-Match titles that are *exactly* `foo` (albeit case insensitively):
-
-```console
-$ ava --match='foo'
-```
-
-Match titles not containing `foo`:
-
-```console
-$ ava --match='!*foo*'
-```
-
-Match titles starting with `foo` and ending with `bar`:
-
-```console
-$ ava --match='foo*bar'
-```
-
-Match titles starting with `foo` or ending with `bar`:
-
-```console
-$ ava --match='foo*' --match='*bar'
-```
-
-Note that a match pattern takes precedence over the `.only` modifier. Only tests with an explicit title are matched. Tests without titles or whose title is derived from the implementation function will be skipped when `--match` is used.
-
-Here's what happens when you run AVA with a match pattern of `*oo*` and the following tests:
-
-```js
-test('foo will run', t => {
- t.pass();
-});
-
-test('moo will also run', t => {
- t.pass();
-});
-
-test.only('boo will run but not exclusively', t => {
- t.pass();
-});
-
-// Won't run, no title
-test(function (t) {
- t.fail();
-});
-
-// Won't run, no explicit title
-test(function foo(t) {
- t.fail();
-});
-```
-
-### Skipping tests
-
-Sometimes failing tests can be hard to fix. You can tell AVA to skip these tests using the `.skip` modifier. They'll still be shown in the output (as having been skipped) but are never run.
-
-```js
-test.skip('will not be run', t => {
- t.fail();
-});
-```
-
-You must specify the implementation function.
-
-### Test placeholders ("todo")
-
-You can use the `.todo` modifier when you're planning to write a test. Like skipped tests these placeholders are shown in the output. They only require a title; you cannot specify the implementation function.
-
-```js
-test.todo('will think about writing this later');
-```
-
-### Failing tests
-
-You can use the `.failing` modifier to document issues with your code that need to be fixed. Failing tests are run just like normal ones, but they are expected to fail, and will not break your build when they do. If a test marked as failing actually passes, it will be reported as an error and fail the build with a helpful message instructing you to remove the `.failing` modifier.
-
-This allows you to merge `.failing` tests before a fix is implemented without breaking CI. This is a great way to recognize good bug report PR's with a commit credit, even if the reporter is unable to actually fix the problem.
-
-```js
-// See: github.com/user/repo/issues/1234
-test.failing('demonstrate some bug', t => {
- t.fail(); // Test will count as passed
-});
-```
-
-### Before & after hooks
-
-AVA lets you register hooks that are run before and after your tests. This allows you to run setup and/or teardown code.
-
-`test.before()` registers a hook to be run before the first test in your test file. Similarly `test.after()` registers a hook to be run after the last test. Use `test.after.always()` to register a hook that will **always** run once your tests and other hooks complete. `.always()` hooks run regardless of whether there were earlier failures or if all tests were skipped, so they are ideal for cleanup tasks. There are two exceptions to this however. If you use `--fail-fast` AVA will stop testing as soon as a failure occurs, and it won't run any hooks including the `.always()` hooks. Uncaught exceptions will crash your tests, possibly preventing `.always()` hooks from running.
-
-`test.beforeEach()` registers a hook to be run before each test in your test file. Similarly `test.afterEach()` a hook to be run after each test. Use `test.afterEach.always()` to register an after hook that is called even if other test hooks, or the test itself, fail. `.always()` hooks are ideal for cleanup tasks.
-
-If a test is skipped with the `.skip` modifier, the respective `.beforeEach()` and `.afterEach()` hooks are not run. Likewise, if all tests in a test file are skipped `.before()` and `.after()` hooks for the file are not run. Hooks modified with `.always()` will always run, even if all tests are skipped.
-
-**Note**: If the `--fail-fast` flag is specified, AVA will stop after the first test failure and the `.always` hook will **not** run.
-
-Like `test()` these methods take an optional title and a callback function. The title is shown if your hook fails to execute. The callback is called with an [execution object](#t).
-
-`before` hooks execute before `beforeEach` hooks. `afterEach` hooks execute before `after` hooks. Within their category the hooks execute in the order they were defined.
-
-```js
-test.before(t => {
- // This runs before all tests
-});
-
-test.before(t => {
- // This runs after the above, but before tests
-});
-
-test.after('cleanup', t => {
- // This runs after all tests
-});
-
-test.after.always('guaranteed cleanup', t => {
- // This will always run, regardless of earlier failures
-});
-
-test.beforeEach(t => {
- // This runs before each test
-});
-
-test.afterEach(t => {
- // This runs after each test
-});
-
-test.afterEach.always(t => {
- // This runs after each test and other test hooks, even if they failed
-});
-
-test(t => {
- // Regular test
-});
-```
-
-Hooks can be synchronous or asynchronous, just like tests. To make a hook asynchronous return a promise or observable, use an async function, or enable callback mode via `test.cb.before()`, `test.cb.beforeEach()` etc.
-
-```js
-test.before(async t => {
- await promiseFn();
-});
-
-test.after(t => {
- return new Promise(/* ... */);
-});
-
-test.cb.beforeEach(t => {
- setTimeout(t.end);
-});
-
-test.afterEach.cb(t => {
- setTimeout(t.end);
-});
-```
-
-Keep in mind that the `beforeEach` and `afterEach` hooks run just before and after a test is run, and that by default tests run concurrently. If you need to set up global state for each test (like spying on `console.log` [for example](https://github.com/avajs/ava/issues/560)), you'll need to make sure the tests are [run serially](#running-tests-serially).
-
-Remember that AVA runs each test file in its own process. You may not have to clean up global state in a `after`-hook since that's only called right before the process exits.
-
-#### Test context
-
-The `beforeEach` & `afterEach` hooks can share context with the test:
-
-```js
-test.beforeEach(t => {
- t.context.data = generateUniqueData();
-});
-
-test(t => {
- t.is(t.context.data + 'bar', 'foobar');
-});
-```
-
-The context is not shared between tests, allowing you to set up data in a way where it will not risk leaking to other, subsequent tests. By default `t.context` is an object but you can reassign it:
-
-```js
-test.beforeEach(t => {
- t.context = 'unicorn';
-});
-
-test(t => {
- t.is(t.context, 'unicorn');
-});
-```
-
-Context sharing is *not* available to `before` and `after` hooks.
-
-### Chaining test modifiers
-
-You can use the `.serial`, `.only` and `.skip` modifiers in any order, with `test`, `before`, `after`, `beforeEach` and `afterEach`. For example:
-
-```js
-test.before.skip(...);
-test.skip.after(...);
-test.serial.only(...);
-test.only.serial(...);
-```
-
-This means you can temporarily add `.skip` or `.only` at the end of a test or hook definition without having to make any other changes.
-
-### Test macros
-
-Additional arguments passed to the test declaration will be passed to the test implementation. This is useful for creating reusable test macros.
-
-```js
-function macro(t, input, expected) {
- t.is(eval(input), expected);
-}
-
-test('2 + 2 = 4', macro, '2 + 2', 4);
-test('2 * 3 = 6', macro, '2 * 3', 6);
-```
-
-You can build the test title programmatically by attaching a `title` function to the macro:
-
-```js
-function macro(t, input, expected) {
- t.is(eval(input), expected);
-}
-
-macro.title = (providedTitle, input, expected) => `${providedTitle} ${input} = ${expected}`.trim();
-
-test(macro, '2 + 2', 4);
-test(macro, '2 * 3', 6);
-test('providedTitle', macro, '3 * 3', 9);
-```
-
-The `providedTitle` argument defaults to an empty string if the user does not supply a string title. This allows for easy concatenation without having to worry about `null` / `undefined`. It is worth remembering that the empty string is considered a falsy value, so you can still use `if(providedTitle) {...}`.
-
-You can also pass arrays of macro functions:
-
-```js
-const safeEval = require('safe-eval');
-
-function evalMacro(t, input, expected) {
- t.is(eval(input), expected);
-}
-
-function safeEvalMacro(t, input, expected) {
- t.is(safeEval(input), expected);
-}
-
-test([evalMacro, safeEvalMacro], '2 + 2', 4);
-test([evalMacro, safeEvalMacro], '2 * 3', 6);
-```
-
-We encourage you to use macros instead of building your own test generators ([here is an example](https://github.com/avajs/ava-codemods/blob/47073b5b58aa6f3fb24f98757be5d3f56218d160/test/ok-to-truthy.js#L7-L9) of code that should be replaced with a macro). Macros are designed to perform static analysis of your code, which can lead to better performance, IDE integration, and linter rules.
-
-### Custom assertions
-
-You can use any assertion library instead of or in addition to the built-in one, provided it throws exceptions when the assertion fails.
-
-This won't give you as nice an experience as you'd get with the [built-in assertions](#assertions) though, and you won't be able to use the [assertion planning](#assertion-planning) ([see #25](https://github.com/avajs/ava/issues/25)).
-
-You'll have to configure AVA to not fail tests if no assertions are executed, because AVA can't tell if custom assertions pass. Set the `failWithoutAssertions` option to `false` in AVA's [`package.json` configuration](#configuration).
-
-```js
-import assert from 'assert';
-
-test(t => {
- assert(true);
-});
-```
-
-### ES2017 support
-
-AVA comes with built-in support for ES2017 through [Babel 6](https://babeljs.io). Just write your tests in ES2017. No extra setup needed. You can use any Babel version in your project. We use our own bundled Babel with our [`@ava/stage-4`](https://github.com/avajs/babel-preset-stage-4) preset, as well as [custom transforms](https://github.com/avajs/babel-preset-transform-test-files) for test and helper files.
-
-The corresponding Babel config for AVA's setup is as follows:
-
-```json
-{
- "presets": [
- "@ava/stage-4",
- "@ava/transform-test-files"
- ]
-}
-```
-
-You can customize how AVA transpiles the test files through the `babel` option in AVA's [`package.json` configuration](#configuration). For example to override the presets you can use:
-
-```json
-{
- "ava": {
- "babel": {
- "presets": [
- "es2015",
- "stage-0",
- "react"
- ]
- }
- }
-}
-```
-
-You can also use the special `"inherit"` keyword. This makes AVA defer to the Babel config in your [`.babelrc` or `package.json` file](https://babeljs.io/docs/usage/babelrc/). This way your test files will be transpiled using the same config as your source files without having to repeat it just for AVA:
-
-```json
-{
- "babel": {
- "presets": [
- "es2015",
- "stage-0",
- "react"
- ]
- },
- "ava": {
- "babel": "inherit"
- }
-}
-```
-
-See AVA's [`.babelrc` recipe](docs/recipes/babelrc.md) for further examples and a more detailed explanation of configuration options.
-
-Note that AVA will *always* apply [a few internal plugins](docs/recipes/babelrc.md#notes) regardless of configuration, but they should not impact the behavior of your code.
-
-### TypeScript support
-
-AVA includes typings for TypeScript. You have to set up transpilation yourself. When you set `module` to `commonjs` in your `tsconfig.json` file, TypeScript will automatically find the type definitions for AVA. You should set `target` to `es2015` to use promises and async functions.
-
-See AVA's [TypeScript recipe](docs/recipes/typescript.md) for a more detailed explanation.
-
-### Transpiling imported modules
-
-AVA currently only transpiles the tests you ask it to run, as well as test helpers (files starting with `_` or in `helpers` directory) inside the test directory. *It will not transpile modules you `import` from outside of the test.* This may be unexpected but there are workarounds.
-
-If you use Babel you can use its [require hook](https://babeljs.io/docs/usage/require/) to transpile imported modules on-the-fly. To add it, [configure it in your `package.json`](#configuration).
-
-You can also transpile your modules in a separate process and refer to the transpiled files rather than the sources from your tests. Example [here](docs/recipes/precompiling-with-webpack.md).
-
-### Promise support
-
-If you return a promise in the test you don't need to explicitly end the test as it will end when the promise resolves.
-
-```js
-test(t => {
- return somePromise().then(result => {
- t.is(result, 'unicorn');
- });
-});
-```
-
-### Generator function support
-
-AVA comes with built-in support for [generator functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*).
-
-```js
-test(function * (t) {
- const value = yield generatorFn();
- t.true(value);
-});
-```
-
-### Async function support
-
-AVA comes with built-in support for [async functions](https://tc39.github.io/ecmascript-asyncawait/) *(async/await)*.
-
-```js
-test(async function (t) {
- const value = await promiseFn();
- t.true(value);
-});
-
-// Async arrow function
-test(async t => {
- const value = await promiseFn();
- t.true(value);
-});
-```
-
-### Observable support
-
-AVA comes with built-in support for [observables](https://github.com/zenparsing/es-observable). If you return an observable from a test, AVA will automatically consume it to completion before ending the test.
-
-*You do not need to use "callback mode" or call `t.end()`.*
-
-```js
-test(t => {
- t.plan(3);
- return Observable.of(1, 2, 3, 4, 5, 6)
- .filter(n => {
- // Only even numbers
- return n % 2 === 0;
- })
- .map(() => t.pass());
-});
-```
-
-### Callback support
-
-AVA supports using `t.end` as the final callback when using node-style error-first callback APIs. AVA will consider any truthy value passed as the first argument to `t.end` to be an error. Note that `t.end` requires "callback mode", which can be enabled by using the `test.cb` chain.
-
-```js
-test.cb(t => {
- // `t.end` automatically checks for error as first argument
- fs.readFile('data.txt', t.end);
-});
-```
-
-### Global timeout
-
-A global timeout can be set via the `--timeout` option.
-Timeout in AVA behaves differently than in other test frameworks.
-AVA resets a timer after each test, forcing tests to quit if no new test results were received within the specified timeout.
-
-You can set timeouts in a human-readable way:
-
-```console
-$ ava --timeout=10s # 10 seconds
-$ ava --timeout=2m # 2 minutes
-$ ava --timeout=100 # 100 milliseconds
-```
-
-## API
-
-### `test([title], implementation)`
-### `test.serial([title], implementation)`
-### `test.cb([title], implementation)`
-### `test.only([title], implementation)`
-### `test.skip([title], implementation)`
-### `test.todo(title)`
-### `test.failing([title], implementation)`
-### `test.before([title], implementation)`
-### `test.after([title], implementation)`
-### `test.beforeEach([title], implementation)`
-### `test.afterEach([title], implementation)`
-
-#### `title`
-
-Type: `string`
-
-Test title.
-
-#### `implementation(t)`
-
-Type: `function`
-
-Should contain the actual test.
-
-##### `t`
-
-Type: `object`
-
-The execution object of a particular test. Each test implementation receives a different object. Contains the [assertions](#assertions) as well as `.plan(count)` and `.end()` methods. `t.context` can contain shared state from `beforeEach` hooks. `t.title` returns the test's title.
-
-###### `t.plan(count)`
-
-Plan how many assertion there are in the test. The test will fail if the actual assertion count doesn't match the number of planned assertions. See [assertion planning](#assertion-planning).
-
-###### `t.end()`
-
-End the test. Only works with `test.cb()`.
-
-###### `t.log(message)`
-
-Print a log message contextually alongside the test result instead of immediately printing it to `stdout` like `console.log`.
-
-## Assertions
-
-Assertions are mixed into the [execution object](#t) provided to each test implementation:
-
-```js
-test(t => {
- t.truthy('unicorn'); // Assertion
-});
-```
-
-If multiple assertion failures are encountered within a single test, AVA will only display the *first* one.
-
-### `.pass([message])`
-
-Passing assertion.
-
-### `.fail([message])`
-
-Failing assertion.
-
-### `.truthy(value, [message])`
-
-Assert that `value` is truthy.
-
-### `.falsy(value, [message])`
-
-Assert that `value` is falsy.
-
-### `.true(value, [message])`
-
-Assert that `value` is `true`.
-
-### `.false(value, [message])`
-
-Assert that `value` is `false`.
-
-### `.is(value, expected, [message])`
-
-Assert that `value` is the same as `expected`. This is based on [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
-
-### `.not(value, expected, [message])`
-
-Assert that `value` is not the same as `expected`. This is based on [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
-
-### `.deepEqual(value, expected, [message])`
-
-Assert that `value` is deeply equal to `expected`. See [Concordance](https://github.com/concordancejs/concordance) for details. Works with [React elements and `react-test-renderer`](https://github.com/concordancejs/react).
-
-### `.notDeepEqual(value, expected, [message])`
-
-Assert that `value` is not deeply equal to `expected`. The inverse of `.deepEqual()`.
-
-### `.throws(function|promise, [error, [message]])`
-
-Assert that `function` throws an error, or `promise` rejects with an error.
-
-`error` can be an error constructor, error message, regex matched against the error message, or validation function.
-
-Returns the error thrown by `function` or a promise for the rejection reason of the specified `promise`.
-
-Example:
-
-```js
-const fn = () => {
- throw new TypeError('🦄');
-};
-
-test('throws', t => {
- const error = t.throws(() => {
- fn();
- }, TypeError);
-
- t.is(error.message, '🦄');
-});
-```
-
-```js
-const promise = Promise.reject(new TypeError('🦄'));
-
-test('rejects', async t => {
- const error = await t.throws(promise);
- t.is(error.message, '🦄');
-});
-```
-
-When testing a promise you must wait for the assertion to complete:
-
-```js
-test('rejects', async t => {
- await t.throws(promise);
-});
-```
-
-### `.notThrows(function|promise, [message])`
-
-Assert that `function` does not throw an error or that `promise` does not reject with an error.
-
-Like the `.throws()` assertion, when testing a promise you must wait for the assertion to complete:
-
-```js
-test('resolves', async t => {
- await t.notThrows(promise);
-});
-```
-
-### `.regex(contents, regex, [message])`
-
-Assert that `contents` matches `regex`.
-
-### `.notRegex(contents, regex, [message])`
-
-Assert that `contents` does not match `regex`.
-
-### `.ifError(error, [message])`
-
-Assert that `error` is falsy.
-
-### `.snapshot(expected, [message])`
-### `.snapshot(expected, [options], [message])`
-
-Compares the `expected` value with a previously recorded snapshot. Snapshots are stored for each test, so ensure you give your tests unique titles. Alternatively pass an `options` object to select a specific snapshot, for instance `{id: 'my snapshot'}`.
-
-## Snapshot testing
-
-AVA supports snapshot testing, [as introduced by Jest](https://facebook.github.io/jest/docs/snapshot-testing.html), through its [Assertions](#assertions) interface. You can snapshot any value as well as React elements:
-
-```js
-// Your component
-const HelloWorld = () => <h1>Hello World...!</h1>;
-
-export default HelloWorld;
-```
-
-```js
-// Your test
-import test from 'ava';
-import render from 'react-test-renderer';
-import HelloWorld from '.';
-
-test('HelloWorld component', t => {
- const tree = render.create(<HelloWorld/>).toJSON();
- t.snapshot(tree);
-});
-```
-
-[Try it out in this example project.](https://github.com/avajs/ava-snapshot-example)
-
-Snapshots are stored alongside your test files. If your tests are in a `test` or `tests` folder the snapshots will be stored in a `snapshots` folder. If your tests are in a `__tests__` folder then they they'll be stored in a `__snapshots__` folder.
-
-Say you have `~/project/test/main.js` which contains snapshot assertions. AVA will create two files:
-
-* `~/project/test/snapshots/main.js.snap`
-* `~/project/test/snapshots/main.js.md`
-
-The first file contains the actual snapshot and is required for future comparisons. The second file contains your *snapshot report*. It's regenerated when you update your snapshots. If you commit it to source control you can diff it to see the changes to your snapshot.
-
-AVA will show why your snapshot assertion failed:
-
-<img src="media/snapshot-testing.png" width="1048">
-
-You can then check your code. If the change was intentional you can use the `--update-snapshots` (or `-u`) flag to update the snapshots:
-
-```console
-$ ava --update-snapshots
-```
-
-You can specify a fixed location for storing the snapshot files in AVA's [`package.json` configuration](#configuration):
-
-```json
-{
- "ava": {
- "snapshotDir": "custom-directory"
- }
-}
-```
-
-The snapshot files will be saved in a directory structure that mirrors that of your test files.
-
-If you are running AVA against precompiled test files, AVA will try and use source maps to determine the location of the original files. Snapshots will be stored next to these files, following the same rules as if AVA had executed the original files directly. This is great if you're writing your tests in TypeScript (see our [TypeScript recipe](docs/recipes/typescript.md)).
-
-### Skipping assertions
-
-Any assertion can be skipped using the `skip` modifier. Skipped assertions are still counted, so there is no need to change your planned assertion count.
-
-```js
-test(t => {
- t.plan(2);
- t.skip.is(foo(), 5); // No need to change your plan count when skipping
- t.is(1, 1);
-});
-```
-
-### Enhanced assertion messages
-
-AVA comes with [`power-assert`](https://github.com/power-assert-js/power-assert) built-in, giving you more descriptive assertion messages. It reads your test and tries to infer more information from the code.
-
-Let's take this example, using Node's standard [`assert` library](https://nodejs.org/api/assert.html):
-
-```js
-const a = /foo/;
-const b = 'bar';
-const c = 'baz';
-require('assert').ok(a.test(b) || b === c);
-```
-
-If you paste that into a Node REPL it'll return:
-
-```
-AssertionError: false == true
-```
-
-In AVA however, this test:
-
-```js
-test(t => {
- const a = /foo/;
- const b = 'bar';
- const c = 'baz';
- t.true(a.test(b) || b === c);
-});
-```
-
-Will output:
-
-```
-t.true(a.test(b) || b === c)
- | | | |
- | "bar" "bar" "baz"
- false
-```
-
-## Process isolation
-
-Each test file is run in a separate Node.js process. This allows you to change the global state or overriding a built-in in one test file, without affecting another. It's also great for performance on modern multi-core processors, allowing multiple test files to execute in parallel.
-
-AVA will set `process.env.NODE_ENV` to `test`, unless the `NODE_ENV` environment variable has been set. This is useful if the code you're testing has test defaults (for example when picking what database to connect to, or environment-specific Babel options). It may cause your code or its dependencies to behave differently though. Note that `'NODE_ENV' in process.env` will always be `true`.
-
-## Tips
-
-### Temp files
-
-Running tests concurrently comes with some challenges, doing file IO is one.
-
-Usually, serial tests create temp directories in the current test directory and clean them up at the end. This won't work when you run tests concurrently as tests will conflict with each other. The correct way to do it is to use a new temp directory for each test. The [`tempfile`](https://github.com/sindresorhus/tempfile) and [`temp-write`](https://github.com/sindresorhus/temp-write) modules can be helpful.
-
-### Code coverage
-
-You can't use [`istanbul`](https://github.com/gotwarlost/istanbul) for code coverage as AVA [spawns the test files](#process-isolation). You can use [`nyc`](https://github.com/bcoe/nyc) instead, which is basically `istanbul` with support for subprocesses.
-
-As of version `5.0.0` it uses source maps to report coverage for your actual code, regardless of transpilation. Make sure that the code you're testing includes an inline source map or references a source map file. If you use `babel-register` you can set the `sourceMaps` option in your Babel config to `inline`.
-
-### Common pitfalls
-
-We have a growing list of [common pitfalls](docs/common-pitfalls.md) you may experience while using AVA. If you encounter any issues you think are common, comment in [this issue](https://github.com/avajs/ava/issues/404).
-
-## FAQ
-
-### Why not `mocha`, `tape`, `tap`?
-
-Mocha requires you to use implicit globals like `describe` and `it` with the default interface (which most people use). It's not very opinionated and executes tests serially without process isolation, making it slow.
-
-Tape and tap are pretty good. AVA is highly inspired by their syntax. They too execute tests serially. Their default [TAP](https://testanything.org) output isn't very user-friendly though so you always end up using an external tap reporter.
-
-In contrast AVA is highly opinionated and runs tests concurrently, with a separate process for each test file. Its default reporter is easy on the eyes and yet AVA still supports TAP output through a CLI flag.
-
-### How is the name written and pronounced?
-
-AVA, not Ava or ava. Pronounced [`/ˈeɪvə/` ay-və](media/pronunciation.m4a?raw=true).
-
-### What is the header background?
-
-It's the [Andromeda galaxy](https://simple.wikipedia.org/wiki/Andromeda_galaxy).
-
-### What is the difference between concurrency and parallelism?
-
-[Concurrency is not parallelism. It enables parallelism.](https://stackoverflow.com/q/1050222)
-
-## Recipes
-
-- [Code coverage](docs/recipes/code-coverage.md)
-- [Watch mode](docs/recipes/watch-mode.md)
-- [Endpoint testing](docs/recipes/endpoint-testing.md)
-- [When to use `t.plan()`](docs/recipes/when-to-use-plan.md)
-- [Browser testing](docs/recipes/browser-testing.md)
-- [TypeScript](docs/recipes/typescript.md)
-- [Configuring Babel](docs/recipes/babelrc.md)
-- [Testing React components](docs/recipes/react.md)
-- [Testing Vue.js components](docs/recipes/vue.md)
-- [JSPM and SystemJS](docs/recipes/jspm-systemjs.md)
-- [Debugging tests with Chrome DevTools](docs/recipes/debugging-with-chrome-devtools.md)
-- [Debugging tests with WebStorm](docs/recipes/debugging-with-webstorm.md)
-- [Precompiling source files with webpack](docs/recipes/precompiling-with-webpack.md)
-- [Isolated MongoDB integration tests](docs/recipes/isolated-mongodb-integration-tests.md)
-
-## Support
-
-- [Stack Overflow](https://stackoverflow.com/questions/tagged/ava)
-- [Gitter chat](https://gitter.im/avajs/ava)
-- [Twitter](https://twitter.com/ava__js)
-
-## Related
-
-- [eslint-plugin-ava](https://github.com/avajs/eslint-plugin-ava) - Lint rules for AVA tests
-- [sublime-ava](https://github.com/avajs/sublime-ava) - Snippets for AVA tests
-- [atom-ava](https://github.com/avajs/atom-ava) - Snippets for AVA tests
-- [vscode-ava](https://github.com/samverschueren/vscode-ava) - Snippets for AVA tests
-- [gulp-ava](https://github.com/avajs/gulp-ava) - Run tests with gulp
-- [grunt-ava](https://github.com/avajs/grunt-ava) - Run tests with grunt
-- [More…](https://github.com/avajs/awesome-ava#packages)
-
-## Links
-
-- [Buy AVA stickers](https://www.stickermule.com/user/1070705604/stickers)
-- [Awesome list](https://github.com/avajs/awesome-ava)
-- [AVA Casts](http://avacasts.com)
-- [More…](https://github.com/avajs/awesome-ava)
-
-## Team
-
-[![Sindre Sorhus](https://github.com/sindresorhus.png?size=100)](https://github.com/sindresorhus) | [![Vadim Demedes](https://github.com/vadimdemedes.png?size=100)](https://github.com/vadimdemedes) | [![James Talmage](https://github.com/jamestalmage.png?size=100)](https://github.com/jamestalmage) | [![Mark Wubben](https://github.com/novemberborn.png?size=100)](https://github.com/novemberborn) | [![Juan Soto](https://github.com/sotojuan.png?size=100)](https://github.com/sotojuan) | [![Jeroen Engels](https://github.com/jfmengels.png?size=100)](https://github.com/jfmengels)
----|---|---|---|---|---
-[Sindre Sorhus](http://sindresorhus.com) | [Vadim Demedes](https://github.com/vadimdemedes) | [James Talmage](https://github.com/jamestalmage) | [Mark Wubben](https://novemberborn.net) | [Juan Soto](http://juansoto.me) | [Jeroen Engels](https://github.com/jfmengels)
-
-### Former
-
-- [Kevin Mårtensson](https://github.com/kevva)
-
-
-<div align="center">
- <br>
- <br>
- <br>
- <a href="https://ava.li">
- <img src="https://cdn.rawgit.com/avajs/ava/fe1cea1ca3d2c8518c0cc39ec8be592beab90558/media/logo.svg" width="200" alt="AVA">
- </a>
- <br>
- <br>
-</div>
diff --git a/node_modules/ava/types/generated.d.ts b/node_modules/ava/types/generated.d.ts
deleted file mode 100644
index 19cbc0a02..000000000
--- a/node_modules/ava/types/generated.d.ts
+++ /dev/null
@@ -1,1150 +0,0 @@
-export type ErrorValidator
- = (new (...args: any[]) => any)
- | RegExp
- | string
- | ((error: any) => boolean);
-
-export interface Observable {
- subscribe(observer: (value: {}) => void): void;
-}
-export type Test = (t: TestContext) => PromiseLike<void> | Iterator<any> | Observable | void;
-export type GenericTest<T> = (t: GenericTestContext<T>) => PromiseLike<void> | Iterator<any> | Observable | void;
-export type CallbackTest = (t: CallbackTestContext) => void;
-export type GenericCallbackTest<T> = (t: GenericCallbackTestContext<T>) => void;
-
-export interface Context<T> { context: T }
-export type AnyContext = Context<any>;
-
-export type ContextualTest = GenericTest<AnyContext>;
-export type ContextualCallbackTest = GenericCallbackTest<AnyContext>;
-
-export interface AssertContext {
- /**
- * Passing assertion.
- */
- pass(message?: string): void;
- /**
- * Failing assertion.
- */
- fail(message?: string): void;
- /**
- * Assert that value is truthy.
- */
- truthy(value: any, message?: string): void;
- /**
- * Assert that value is falsy.
- */
- falsy(value: any, message?: string): void;
- /**
- * Assert that value is true.
- */
- true(value: any, message?: string): void;
- /**
- * Assert that value is false.
- */
- false(value: any, message?: string): void;
- /**
- * Assert that value is equal to expected.
- */
- is<U>(value: U, expected: U, message?: string): void;
- /**
- * Assert that value is not equal to expected.
- */
- not<U>(value: U, expected: U, message?: string): void;
- /**
- * Assert that value is deep equal to expected.
- */
- deepEqual<U>(value: U, expected: U, message?: string): void;
- /**
- * Assert that value is not deep equal to expected.
- */
- notDeepEqual<U>(value: U, expected: U, message?: string): void;
- /**
- * Assert that function throws an error or promise rejects.
- * @param error Can be a constructor, regex, error message or validation function.
- */
- throws(value: PromiseLike<any>, error?: ErrorValidator, message?: string): Promise<any>;
- throws(value: () => void, error?: ErrorValidator, message?: string): any;
- /**
- * Assert that function doesn't throw an error or promise resolves.
- */
- notThrows(value: PromiseLike<any>, message?: string): Promise<void>;
- notThrows(value: () => void, message?: string): void;
- /**
- * Assert that contents matches regex.
- */
- regex(contents: string, regex: RegExp, message?: string): void;
- /**
- * Assert that contents matches a snapshot.
- */
- snapshot(contents: any, message?: string): void;
- /**
- * Assert that contents does not match regex.
- */
- notRegex(contents: string, regex: RegExp, message?: string): void;
- /**
- * Assert that error is falsy.
- */
- ifError(error: any, message?: string): void;
-}
-export interface TestContext extends AssertContext {
- /**
- * Test title.
- */
- title: string;
- /**
- * Plan how many assertion there are in the test.
- * The test will fail if the actual assertion count doesn't match planned assertions.
- */
- plan(count: number): void;
-
- skip: AssertContext;
- /**
- * Print a log message contextually alongside the test result instead of immediately printing it to stdout like console.log.
- */
- log(message: string): void;
-}
-export interface CallbackTestContext extends TestContext {
- /**
- * End the test.
- */
- end(): void;
-}
-
-export type GenericTestContext<T> = TestContext & T;
-export type GenericCallbackTestContext<T> = CallbackTestContext & T;
-
-export interface Macro<T> {
- (t: T, ...args: any[]): void;
- title? (providedTitle: string, ...args: any[]): string;
-}
-export type Macros<T> = Macro<T> | Macro<T>[];
-
-interface RegisterBase<T> {
- (name: string, run: GenericTest<T>): void;
- (run: GenericTest<T>): void;
- (name: string, run: Macros<GenericTestContext<T>>, ...args: any[]): void;
- (run: Macros<GenericTestContext<T>>, ...args: any[]): void;
-}
-
-interface CallbackRegisterBase<T> {
- (name: string, run: GenericCallbackTest<T>): void;
- (run: GenericCallbackTest<T>): void;
- (name: string, run: Macros<GenericCallbackTestContext<T>>, ...args: any[]): void;
- (run: Macros<GenericCallbackTestContext<T>>, ...args: any[]): void;
-}
-
-export default test;
-export const test: RegisterContextual<any>;
-export interface RegisterContextual<T> extends Register<Context<T>> {
-}
-export interface Register<T> extends RegisterBase<T> {
- serial: RegisterBase<T> & Register_serial<T>;
- before: RegisterBase<T> & Register_before<T>;
- after: RegisterBase<T> & Register_after<T>;
- skip: RegisterBase<T> & Register_skip<T>;
- todo: (name: string) => void;
- failing: RegisterBase<T> & Register_failing<T>;
- only: RegisterBase<T> & Register_only<T>;
- beforeEach: RegisterBase<T> & Register_beforeEach<T>;
- afterEach: RegisterBase<T> & Register_afterEach<T>;
- cb: CallbackRegisterBase<T> & Register_cb<T>;
-}
-interface Register_serial<T> {
- before: Register_before_serial<T>;
- after: Register_after_serial<T>;
- skip: RegisterBase<T> & Register_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_failing_serial<T>;
- only: Register_only_serial<T>;
- beforeEach: Register_beforeEach_serial<T>;
- afterEach: Register_afterEach_serial<T>;
- cb: Register_cb_serial<T>;
- always: Register_always_serial<T>;
-}
-interface Register_serial_skip<T> {
- before: Register_before_serial_skip<T>;
- after: Register_after_serial_skip<T>;
- failing: Register_failing_serial_skip<T>;
- beforeEach: Register_beforeEach_serial_skip<T>;
- afterEach: Register_afterEach_serial_skip<T>;
- cb: Register_cb_serial_skip<T>;
- always: Register_always_serial_skip<T>;
-}
-interface Register_serial_todo<T> {
- before: Register_before_serial_todo<T>;
- after: Register_after_serial_todo<T>;
- failing: Register_failing_serial_todo<T>;
- beforeEach: Register_beforeEach_serial_todo<T>;
- afterEach: Register_afterEach_serial_todo<T>;
- cb: Register_cb_serial_todo<T>;
- always: Register_always_serial_todo<T>;
-}
-interface Register_before<T> {
- serial: RegisterBase<T> & Register_before_serial<T>;
- skip: RegisterBase<T> & Register_before_skip<T>;
- todo: (name: string) => void;
- failing: RegisterBase<T> & Register_before_failing<T>;
- cb: CallbackRegisterBase<T> & Register_before_cb<T>;
-}
-interface Register_before_serial<T> {
- skip: RegisterBase<T> & Register_before_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_before_failing_serial<T>;
- cb: Register_before_cb_serial<T>;
-}
-interface Register_before_serial_skip<T> {
- failing: Register_before_failing_serial_skip<T>;
- cb: Register_before_cb_serial_skip<T>;
-}
-interface Register_before_serial_todo<T> {
- failing: Register_before_failing_serial_todo<T>;
- cb: Register_before_cb_serial_todo<T>;
-}
-interface Register_before_skip<T> {
- serial: Register_before_serial_skip<T>;
- failing: Register_before_failing_skip<T>;
- cb: Register_before_cb_skip<T>;
-}
-interface Register_before_todo<T> {
- serial: Register_before_serial_todo<T>;
- failing: Register_before_failing_todo<T>;
- cb: Register_before_cb_todo<T>;
-}
-interface Register_before_failing<T> {
- serial: RegisterBase<T> & Register_before_failing_serial<T>;
- skip: RegisterBase<T> & Register_before_failing_skip<T>;
- todo: (name: string) => void;
- cb: Register_before_cb_failing<T>;
-}
-interface Register_before_failing_serial<T> {
- skip: RegisterBase<T> & Register_before_failing_serial_skip<T>;
- todo: (name: string) => void;
- cb: Register_before_cb_failing_serial<T>;
-}
-interface Register_before_failing_serial_skip<T> {
- cb: Register_before_cb_failing_serial<T>['skip'];
-}
-interface Register_before_failing_serial_todo<T> {
- cb: Register_before_cb_failing_serial<T>['todo'];
-}
-interface Register_before_failing_skip<T> {
- serial: Register_before_failing_serial_skip<T>;
- cb: Register_before_cb_failing_skip<T>;
-}
-interface Register_before_failing_todo<T> {
- serial: Register_before_failing_serial_todo<T>;
- cb: Register_before_cb_failing_todo<T>;
-}
-interface Register_before_cb<T> {
- serial: CallbackRegisterBase<T> & Register_before_cb_serial<T>;
- skip: CallbackRegisterBase<T> & Register_before_cb_skip<T>;
- todo: (name: string) => void;
- failing: CallbackRegisterBase<T> & Register_before_cb_failing<T>;
-}
-interface Register_before_cb_serial<T> {
- skip: CallbackRegisterBase<T> & Register_before_cb_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_before_cb_failing_serial<T>;
-}
-interface Register_before_cb_serial_skip<T> {
- failing: Register_before_cb_failing_serial<T>['skip'];
-}
-interface Register_before_cb_serial_todo<T> {
- failing: Register_before_cb_failing_serial<T>['todo'];
-}
-interface Register_before_cb_skip<T> {
- serial: Register_before_cb_serial_skip<T>;
- failing: Register_before_cb_failing_skip<T>;
-}
-interface Register_before_cb_todo<T> {
- serial: Register_before_cb_serial_todo<T>;
- failing: Register_before_cb_failing_todo<T>;
-}
-interface Register_before_cb_failing<T> {
- serial: CallbackRegisterBase<T> & Register_before_cb_failing_serial<T>;
- skip: CallbackRegisterBase<T> & Register_before_cb_failing_skip<T>;
- todo: (name: string) => void;
-}
-interface Register_before_cb_failing_serial<T> {
- skip: CallbackRegisterBase<T>;
- todo: (name: string) => void;
-}
-interface Register_before_cb_failing_skip<T> {
- serial: Register_before_cb_failing_serial<T>['skip'];
-}
-interface Register_before_cb_failing_todo<T> {
- serial: Register_before_cb_failing_serial<T>['todo'];
-}
-interface Register_after<T> {
- serial: RegisterBase<T> & Register_after_serial<T>;
- skip: RegisterBase<T> & Register_after_skip<T>;
- todo: (name: string) => void;
- failing: RegisterBase<T> & Register_after_failing<T>;
- cb: CallbackRegisterBase<T> & Register_after_cb<T>;
- always: RegisterBase<T> & Register_after_always<T>;
-}
-interface Register_after_serial<T> {
- skip: RegisterBase<T> & Register_after_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_after_failing_serial<T>;
- cb: Register_after_cb_serial<T>;
- always: Register_after_always_serial<T>;
-}
-interface Register_after_serial_skip<T> {
- failing: Register_after_failing_serial_skip<T>;
- cb: Register_after_cb_serial_skip<T>;
- always: Register_after_always_serial_skip<T>;
-}
-interface Register_after_serial_todo<T> {
- failing: Register_after_failing_serial_todo<T>;
- cb: Register_after_cb_serial_todo<T>;
- always: Register_after_always_serial_todo<T>;
-}
-interface Register_after_skip<T> {
- serial: Register_after_serial_skip<T>;
- failing: Register_after_failing_skip<T>;
- cb: Register_after_cb_skip<T>;
- always: Register_after_always_skip<T>;
-}
-interface Register_after_todo<T> {
- serial: Register_after_serial_todo<T>;
- failing: Register_after_failing_todo<T>;
- cb: Register_after_cb_todo<T>;
- always: Register_after_always_todo<T>;
-}
-interface Register_after_failing<T> {
- serial: RegisterBase<T> & Register_after_failing_serial<T>;
- skip: RegisterBase<T> & Register_after_failing_skip<T>;
- todo: (name: string) => void;
- cb: Register_after_cb_failing<T>;
- always: Register_after_always_failing<T>;
-}
-interface Register_after_failing_serial<T> {
- skip: RegisterBase<T> & Register_after_failing_serial_skip<T>;
- todo: (name: string) => void;
- cb: Register_after_cb_failing_serial<T>;
- always: Register_after_always_failing_serial<T>;
-}
-interface Register_after_failing_serial_skip<T> {
- cb: Register_after_cb_failing_serial_skip<T>;
- always: Register_after_always_failing_serial_skip<T>;
-}
-interface Register_after_failing_serial_todo<T> {
- cb: Register_after_cb_failing_serial_todo<T>;
- always: Register_after_always_failing_serial_todo<T>;
-}
-interface Register_after_failing_skip<T> {
- serial: Register_after_failing_serial_skip<T>;
- cb: Register_after_cb_failing_skip<T>;
- always: Register_after_always_failing_skip<T>;
-}
-interface Register_after_failing_todo<T> {
- serial: Register_after_failing_serial_todo<T>;
- cb: Register_after_cb_failing_todo<T>;
- always: Register_after_always_failing_todo<T>;
-}
-interface Register_after_cb<T> {
- serial: CallbackRegisterBase<T> & Register_after_cb_serial<T>;
- skip: CallbackRegisterBase<T> & Register_after_cb_skip<T>;
- todo: (name: string) => void;
- failing: CallbackRegisterBase<T> & Register_after_cb_failing<T>;
- always: Register_after_always_cb<T>;
-}
-interface Register_after_cb_serial<T> {
- skip: CallbackRegisterBase<T> & Register_after_cb_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_after_cb_failing_serial<T>;
- always: Register_after_always_cb_serial<T>;
-}
-interface Register_after_cb_serial_skip<T> {
- failing: Register_after_cb_failing_serial_skip<T>;
- always: Register_after_always_cb_serial_skip<T>;
-}
-interface Register_after_cb_serial_todo<T> {
- failing: Register_after_cb_failing_serial_todo<T>;
- always: Register_after_always_cb_serial_todo<T>;
-}
-interface Register_after_cb_skip<T> {
- serial: Register_after_cb_serial_skip<T>;
- failing: Register_after_cb_failing_skip<T>;
- always: Register_after_always_cb_skip<T>;
-}
-interface Register_after_cb_todo<T> {
- serial: Register_after_cb_serial_todo<T>;
- failing: Register_after_cb_failing_todo<T>;
- always: Register_after_always_cb_todo<T>;
-}
-interface Register_after_cb_failing<T> {
- serial: CallbackRegisterBase<T> & Register_after_cb_failing_serial<T>;
- skip: CallbackRegisterBase<T> & Register_after_cb_failing_skip<T>;
- todo: (name: string) => void;
- always: Register_after_always_cb_failing<T>;
-}
-interface Register_after_cb_failing_serial<T> {
- skip: CallbackRegisterBase<T> & Register_after_cb_failing_serial_skip<T>;
- todo: (name: string) => void;
- always: Register_after_always_cb_failing_serial<T>;
-}
-interface Register_after_cb_failing_serial_skip<T> {
- always: Register_after_always_cb_failing_serial<T>['skip'];
-}
-interface Register_after_cb_failing_serial_todo<T> {
- always: Register_after_always_cb_failing_serial<T>['todo'];
-}
-interface Register_after_cb_failing_skip<T> {
- serial: Register_after_cb_failing_serial_skip<T>;
- always: Register_after_always_cb_failing_skip<T>;
-}
-interface Register_after_cb_failing_todo<T> {
- serial: Register_after_cb_failing_serial_todo<T>;
- always: Register_after_always_cb_failing_todo<T>;
-}
-interface Register_after_always<T> {
- serial: RegisterBase<T> & Register_after_always_serial<T>;
- skip: RegisterBase<T> & Register_after_always_skip<T>;
- todo: (name: string) => void;
- failing: RegisterBase<T> & Register_after_always_failing<T>;
- cb: CallbackRegisterBase<T> & Register_after_always_cb<T>;
-}
-interface Register_after_always_serial<T> {
- skip: RegisterBase<T> & Register_after_always_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_after_always_failing_serial<T>;
- cb: Register_after_always_cb_serial<T>;
-}
-interface Register_after_always_serial_skip<T> {
- failing: Register_after_always_failing_serial_skip<T>;
- cb: Register_after_always_cb_serial_skip<T>;
-}
-interface Register_after_always_serial_todo<T> {
- failing: Register_after_always_failing_serial_todo<T>;
- cb: Register_after_always_cb_serial_todo<T>;
-}
-interface Register_after_always_skip<T> {
- serial: Register_after_always_serial_skip<T>;
- failing: Register_after_always_failing_skip<T>;
- cb: Register_after_always_cb_skip<T>;
-}
-interface Register_after_always_todo<T> {
- serial: Register_after_always_serial_todo<T>;
- failing: Register_after_always_failing_todo<T>;
- cb: Register_after_always_cb_todo<T>;
-}
-interface Register_after_always_failing<T> {
- serial: RegisterBase<T> & Register_after_always_failing_serial<T>;
- skip: RegisterBase<T> & Register_after_always_failing_skip<T>;
- todo: (name: string) => void;
- cb: Register_after_always_cb_failing<T>;
-}
-interface Register_after_always_failing_serial<T> {
- skip: RegisterBase<T> & Register_after_always_failing_serial_skip<T>;
- todo: (name: string) => void;
- cb: Register_after_always_cb_failing_serial<T>;
-}
-interface Register_after_always_failing_serial_skip<T> {
- cb: Register_after_always_cb_failing_serial<T>['skip'];
-}
-interface Register_after_always_failing_serial_todo<T> {
- cb: Register_after_always_cb_failing_serial<T>['todo'];
-}
-interface Register_after_always_failing_skip<T> {
- serial: Register_after_always_failing_serial_skip<T>;
- cb: Register_after_always_cb_failing_skip<T>;
-}
-interface Register_after_always_failing_todo<T> {
- serial: Register_after_always_failing_serial_todo<T>;
- cb: Register_after_always_cb_failing_todo<T>;
-}
-interface Register_after_always_cb<T> {
- serial: CallbackRegisterBase<T> & Register_after_always_cb_serial<T>;
- skip: CallbackRegisterBase<T> & Register_after_always_cb_skip<T>;
- todo: (name: string) => void;
- failing: CallbackRegisterBase<T> & Register_after_always_cb_failing<T>;
-}
-interface Register_after_always_cb_serial<T> {
- skip: CallbackRegisterBase<T> & Register_after_always_cb_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_after_always_cb_failing_serial<T>;
-}
-interface Register_after_always_cb_serial_skip<T> {
- failing: Register_after_always_cb_failing_serial<T>['skip'];
-}
-interface Register_after_always_cb_serial_todo<T> {
- failing: Register_after_always_cb_failing_serial<T>['todo'];
-}
-interface Register_after_always_cb_skip<T> {
- serial: Register_after_always_cb_serial_skip<T>;
- failing: Register_after_always_cb_failing_skip<T>;
-}
-interface Register_after_always_cb_todo<T> {
- serial: Register_after_always_cb_serial_todo<T>;
- failing: Register_after_always_cb_failing_todo<T>;
-}
-interface Register_after_always_cb_failing<T> {
- serial: CallbackRegisterBase<T> & Register_after_always_cb_failing_serial<T>;
- skip: CallbackRegisterBase<T> & Register_after_always_cb_failing_skip<T>;
- todo: (name: string) => void;
-}
-interface Register_after_always_cb_failing_serial<T> {
- skip: CallbackRegisterBase<T>;
- todo: (name: string) => void;
-}
-interface Register_after_always_cb_failing_skip<T> {
- serial: Register_after_always_cb_failing_serial<T>['skip'];
-}
-interface Register_after_always_cb_failing_todo<T> {
- serial: Register_after_always_cb_failing_serial<T>['todo'];
-}
-interface Register_skip<T> {
- serial: Register_serial_skip<T>;
- before: Register_before_skip<T>;
- after: Register_after_skip<T>;
- failing: Register_failing_skip<T>;
- beforeEach: Register_beforeEach_skip<T>;
- afterEach: Register_afterEach_skip<T>;
- cb: Register_cb_skip<T>;
- always: Register_always_skip<T>;
-}
-interface Register_todo<T> {
- serial: Register_serial_todo<T>;
- before: Register_before_todo<T>;
- after: Register_after_todo<T>;
- failing: Register_failing_todo<T>;
- beforeEach: Register_beforeEach_todo<T>;
- afterEach: Register_afterEach_todo<T>;
- cb: Register_cb_todo<T>;
- always: Register_always_todo<T>;
-}
-interface Register_failing<T> {
- serial: RegisterBase<T> & Register_failing_serial<T>;
- before: Register_before_failing<T>;
- after: Register_after_failing<T>;
- skip: RegisterBase<T> & Register_failing_skip<T>;
- todo: (name: string) => void;
- only: RegisterBase<T> & Register_failing_only<T>;
- beforeEach: Register_beforeEach_failing<T>;
- afterEach: Register_afterEach_failing<T>;
- cb: Register_cb_failing<T>;
- always: Register_always_failing<T>;
-}
-interface Register_failing_serial<T> {
- before: Register_before_failing_serial<T>;
- after: Register_after_failing_serial<T>;
- skip: RegisterBase<T> & Register_failing_serial_skip<T>;
- todo: (name: string) => void;
- only: Register_failing_only_serial<T>;
- beforeEach: Register_beforeEach_failing_serial<T>;
- afterEach: Register_afterEach_failing_serial<T>;
- cb: Register_cb_failing_serial<T>;
- always: Register_always_failing_serial<T>;
-}
-interface Register_failing_serial_skip<T> {
- before: Register_before_failing_serial_skip<T>;
- after: Register_after_failing_serial_skip<T>;
- beforeEach: Register_beforeEach_failing_serial_skip<T>;
- afterEach: Register_afterEach_failing_serial_skip<T>;
- cb: Register_cb_failing_serial_skip<T>;
- always: Register_always_failing_serial_skip<T>;
-}
-interface Register_failing_serial_todo<T> {
- before: Register_before_failing_serial_todo<T>;
- after: Register_after_failing_serial_todo<T>;
- beforeEach: Register_beforeEach_failing_serial_todo<T>;
- afterEach: Register_afterEach_failing_serial_todo<T>;
- cb: Register_cb_failing_serial_todo<T>;
- always: Register_always_failing_serial_todo<T>;
-}
-interface Register_failing_skip<T> {
- serial: Register_failing_serial_skip<T>;
- before: Register_before_failing_skip<T>;
- after: Register_after_failing_skip<T>;
- beforeEach: Register_beforeEach_failing_skip<T>;
- afterEach: Register_afterEach_failing_skip<T>;
- cb: Register_cb_failing_skip<T>;
- always: Register_always_failing_skip<T>;
-}
-interface Register_failing_todo<T> {
- serial: Register_failing_serial_todo<T>;
- before: Register_before_failing_todo<T>;
- after: Register_after_failing_todo<T>;
- beforeEach: Register_beforeEach_failing_todo<T>;
- afterEach: Register_afterEach_failing_todo<T>;
- cb: Register_cb_failing_todo<T>;
- always: Register_always_failing_todo<T>;
-}
-interface Register_failing_only<T> {
- serial: RegisterBase<T> & Register_failing_only_serial<T>;
- cb: Register_cb_failing_only<T>;
-}
-interface Register_failing_only_serial<T> {
- cb: Register_cb_failing_only<T>['serial'];
-}
-interface Register_only<T> {
- serial: RegisterBase<T> & Register_only_serial<T>;
- failing: Register_failing_only<T>;
- cb: Register_cb_only<T>;
-}
-interface Register_only_serial<T> {
- failing: Register_failing_only_serial<T>;
- cb: Register_cb_only_serial<T>;
-}
-interface Register_beforeEach<T> {
- serial: RegisterBase<T> & Register_beforeEach_serial<T>;
- skip: RegisterBase<T> & Register_beforeEach_skip<T>;
- todo: (name: string) => void;
- failing: RegisterBase<T> & Register_beforeEach_failing<T>;
- cb: CallbackRegisterBase<T> & Register_beforeEach_cb<T>;
-}
-interface Register_beforeEach_serial<T> {
- skip: RegisterBase<T> & Register_beforeEach_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_beforeEach_failing_serial<T>;
- cb: Register_beforeEach_cb_serial<T>;
-}
-interface Register_beforeEach_serial_skip<T> {
- failing: Register_beforeEach_failing_serial_skip<T>;
- cb: Register_beforeEach_cb_serial_skip<T>;
-}
-interface Register_beforeEach_serial_todo<T> {
- failing: Register_beforeEach_failing_serial_todo<T>;
- cb: Register_beforeEach_cb_serial_todo<T>;
-}
-interface Register_beforeEach_skip<T> {
- serial: Register_beforeEach_serial_skip<T>;
- failing: Register_beforeEach_failing_skip<T>;
- cb: Register_beforeEach_cb_skip<T>;
-}
-interface Register_beforeEach_todo<T> {
- serial: Register_beforeEach_serial_todo<T>;
- failing: Register_beforeEach_failing_todo<T>;
- cb: Register_beforeEach_cb_todo<T>;
-}
-interface Register_beforeEach_failing<T> {
- serial: RegisterBase<T> & Register_beforeEach_failing_serial<T>;
- skip: RegisterBase<T> & Register_beforeEach_failing_skip<T>;
- todo: (name: string) => void;
- cb: Register_beforeEach_cb_failing<T>;
-}
-interface Register_beforeEach_failing_serial<T> {
- skip: RegisterBase<T> & Register_beforeEach_failing_serial_skip<T>;
- todo: (name: string) => void;
- cb: Register_beforeEach_cb_failing_serial<T>;
-}
-interface Register_beforeEach_failing_serial_skip<T> {
- cb: Register_beforeEach_cb_failing_serial<T>['skip'];
-}
-interface Register_beforeEach_failing_serial_todo<T> {
- cb: Register_beforeEach_cb_failing_serial<T>['todo'];
-}
-interface Register_beforeEach_failing_skip<T> {
- serial: Register_beforeEach_failing_serial_skip<T>;
- cb: Register_beforeEach_cb_failing_skip<T>;
-}
-interface Register_beforeEach_failing_todo<T> {
- serial: Register_beforeEach_failing_serial_todo<T>;
- cb: Register_beforeEach_cb_failing_todo<T>;
-}
-interface Register_beforeEach_cb<T> {
- serial: CallbackRegisterBase<T> & Register_beforeEach_cb_serial<T>;
- skip: CallbackRegisterBase<T> & Register_beforeEach_cb_skip<T>;
- todo: (name: string) => void;
- failing: CallbackRegisterBase<T> & Register_beforeEach_cb_failing<T>;
-}
-interface Register_beforeEach_cb_serial<T> {
- skip: CallbackRegisterBase<T> & Register_beforeEach_cb_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_beforeEach_cb_failing_serial<T>;
-}
-interface Register_beforeEach_cb_serial_skip<T> {
- failing: Register_beforeEach_cb_failing_serial<T>['skip'];
-}
-interface Register_beforeEach_cb_serial_todo<T> {
- failing: Register_beforeEach_cb_failing_serial<T>['todo'];
-}
-interface Register_beforeEach_cb_skip<T> {
- serial: Register_beforeEach_cb_serial_skip<T>;
- failing: Register_beforeEach_cb_failing_skip<T>;
-}
-interface Register_beforeEach_cb_todo<T> {
- serial: Register_beforeEach_cb_serial_todo<T>;
- failing: Register_beforeEach_cb_failing_todo<T>;
-}
-interface Register_beforeEach_cb_failing<T> {
- serial: CallbackRegisterBase<T> & Register_beforeEach_cb_failing_serial<T>;
- skip: CallbackRegisterBase<T> & Register_beforeEach_cb_failing_skip<T>;
- todo: (name: string) => void;
-}
-interface Register_beforeEach_cb_failing_serial<T> {
- skip: CallbackRegisterBase<T>;
- todo: (name: string) => void;
-}
-interface Register_beforeEach_cb_failing_skip<T> {
- serial: Register_beforeEach_cb_failing_serial<T>['skip'];
-}
-interface Register_beforeEach_cb_failing_todo<T> {
- serial: Register_beforeEach_cb_failing_serial<T>['todo'];
-}
-interface Register_afterEach<T> {
- serial: RegisterBase<T> & Register_afterEach_serial<T>;
- skip: RegisterBase<T> & Register_afterEach_skip<T>;
- todo: (name: string) => void;
- failing: RegisterBase<T> & Register_afterEach_failing<T>;
- cb: CallbackRegisterBase<T> & Register_afterEach_cb<T>;
- always: RegisterBase<T> & Register_afterEach_always<T>;
-}
-interface Register_afterEach_serial<T> {
- skip: RegisterBase<T> & Register_afterEach_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_afterEach_failing_serial<T>;
- cb: Register_afterEach_cb_serial<T>;
- always: Register_afterEach_always_serial<T>;
-}
-interface Register_afterEach_serial_skip<T> {
- failing: Register_afterEach_failing_serial_skip<T>;
- cb: Register_afterEach_cb_serial_skip<T>;
- always: Register_afterEach_always_serial_skip<T>;
-}
-interface Register_afterEach_serial_todo<T> {
- failing: Register_afterEach_failing_serial_todo<T>;
- cb: Register_afterEach_cb_serial_todo<T>;
- always: Register_afterEach_always_serial_todo<T>;
-}
-interface Register_afterEach_skip<T> {
- serial: Register_afterEach_serial_skip<T>;
- failing: Register_afterEach_failing_skip<T>;
- cb: Register_afterEach_cb_skip<T>;
- always: Register_afterEach_always_skip<T>;
-}
-interface Register_afterEach_todo<T> {
- serial: Register_afterEach_serial_todo<T>;
- failing: Register_afterEach_failing_todo<T>;
- cb: Register_afterEach_cb_todo<T>;
- always: Register_afterEach_always_todo<T>;
-}
-interface Register_afterEach_failing<T> {
- serial: RegisterBase<T> & Register_afterEach_failing_serial<T>;
- skip: RegisterBase<T> & Register_afterEach_failing_skip<T>;
- todo: (name: string) => void;
- cb: Register_afterEach_cb_failing<T>;
- always: Register_afterEach_always_failing<T>;
-}
-interface Register_afterEach_failing_serial<T> {
- skip: RegisterBase<T> & Register_afterEach_failing_serial_skip<T>;
- todo: (name: string) => void;
- cb: Register_afterEach_cb_failing_serial<T>;
- always: Register_afterEach_always_failing_serial<T>;
-}
-interface Register_afterEach_failing_serial_skip<T> {
- cb: Register_afterEach_cb_failing_serial_skip<T>;
- always: Register_afterEach_always_failing_serial_skip<T>;
-}
-interface Register_afterEach_failing_serial_todo<T> {
- cb: Register_afterEach_cb_failing_serial_todo<T>;
- always: Register_afterEach_always_failing_serial_todo<T>;
-}
-interface Register_afterEach_failing_skip<T> {
- serial: Register_afterEach_failing_serial_skip<T>;
- cb: Register_afterEach_cb_failing_skip<T>;
- always: Register_afterEach_always_failing_skip<T>;
-}
-interface Register_afterEach_failing_todo<T> {
- serial: Register_afterEach_failing_serial_todo<T>;
- cb: Register_afterEach_cb_failing_todo<T>;
- always: Register_afterEach_always_failing_todo<T>;
-}
-interface Register_afterEach_cb<T> {
- serial: CallbackRegisterBase<T> & Register_afterEach_cb_serial<T>;
- skip: CallbackRegisterBase<T> & Register_afterEach_cb_skip<T>;
- todo: (name: string) => void;
- failing: CallbackRegisterBase<T> & Register_afterEach_cb_failing<T>;
- always: Register_afterEach_always_cb<T>;
-}
-interface Register_afterEach_cb_serial<T> {
- skip: CallbackRegisterBase<T> & Register_afterEach_cb_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_afterEach_cb_failing_serial<T>;
- always: Register_afterEach_always_cb_serial<T>;
-}
-interface Register_afterEach_cb_serial_skip<T> {
- failing: Register_afterEach_cb_failing_serial_skip<T>;
- always: Register_afterEach_always_cb_serial_skip<T>;
-}
-interface Register_afterEach_cb_serial_todo<T> {
- failing: Register_afterEach_cb_failing_serial_todo<T>;
- always: Register_afterEach_always_cb_serial_todo<T>;
-}
-interface Register_afterEach_cb_skip<T> {
- serial: Register_afterEach_cb_serial_skip<T>;
- failing: Register_afterEach_cb_failing_skip<T>;
- always: Register_afterEach_always_cb_skip<T>;
-}
-interface Register_afterEach_cb_todo<T> {
- serial: Register_afterEach_cb_serial_todo<T>;
- failing: Register_afterEach_cb_failing_todo<T>;
- always: Register_afterEach_always_cb_todo<T>;
-}
-interface Register_afterEach_cb_failing<T> {
- serial: CallbackRegisterBase<T> & Register_afterEach_cb_failing_serial<T>;
- skip: CallbackRegisterBase<T> & Register_afterEach_cb_failing_skip<T>;
- todo: (name: string) => void;
- always: Register_afterEach_always_cb_failing<T>;
-}
-interface Register_afterEach_cb_failing_serial<T> {
- skip: CallbackRegisterBase<T> & Register_afterEach_cb_failing_serial_skip<T>;
- todo: (name: string) => void;
- always: Register_afterEach_always_cb_failing_serial<T>;
-}
-interface Register_afterEach_cb_failing_serial_skip<T> {
- always: Register_afterEach_always_cb_failing_serial<T>['skip'];
-}
-interface Register_afterEach_cb_failing_serial_todo<T> {
- always: Register_afterEach_always_cb_failing_serial<T>['todo'];
-}
-interface Register_afterEach_cb_failing_skip<T> {
- serial: Register_afterEach_cb_failing_serial_skip<T>;
- always: Register_afterEach_always_cb_failing_skip<T>;
-}
-interface Register_afterEach_cb_failing_todo<T> {
- serial: Register_afterEach_cb_failing_serial_todo<T>;
- always: Register_afterEach_always_cb_failing_todo<T>;
-}
-interface Register_afterEach_always<T> {
- serial: RegisterBase<T> & Register_afterEach_always_serial<T>;
- skip: RegisterBase<T> & Register_afterEach_always_skip<T>;
- todo: (name: string) => void;
- failing: RegisterBase<T> & Register_afterEach_always_failing<T>;
- cb: CallbackRegisterBase<T> & Register_afterEach_always_cb<T>;
-}
-interface Register_afterEach_always_serial<T> {
- skip: RegisterBase<T> & Register_afterEach_always_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_afterEach_always_failing_serial<T>;
- cb: Register_afterEach_always_cb_serial<T>;
-}
-interface Register_afterEach_always_serial_skip<T> {
- failing: Register_afterEach_always_failing_serial_skip<T>;
- cb: Register_afterEach_always_cb_serial_skip<T>;
-}
-interface Register_afterEach_always_serial_todo<T> {
- failing: Register_afterEach_always_failing_serial_todo<T>;
- cb: Register_afterEach_always_cb_serial_todo<T>;
-}
-interface Register_afterEach_always_skip<T> {
- serial: Register_afterEach_always_serial_skip<T>;
- failing: Register_afterEach_always_failing_skip<T>;
- cb: Register_afterEach_always_cb_skip<T>;
-}
-interface Register_afterEach_always_todo<T> {
- serial: Register_afterEach_always_serial_todo<T>;
- failing: Register_afterEach_always_failing_todo<T>;
- cb: Register_afterEach_always_cb_todo<T>;
-}
-interface Register_afterEach_always_failing<T> {
- serial: RegisterBase<T> & Register_afterEach_always_failing_serial<T>;
- skip: RegisterBase<T> & Register_afterEach_always_failing_skip<T>;
- todo: (name: string) => void;
- cb: Register_afterEach_always_cb_failing<T>;
-}
-interface Register_afterEach_always_failing_serial<T> {
- skip: RegisterBase<T> & Register_afterEach_always_failing_serial_skip<T>;
- todo: (name: string) => void;
- cb: Register_afterEach_always_cb_failing_serial<T>;
-}
-interface Register_afterEach_always_failing_serial_skip<T> {
- cb: Register_afterEach_always_cb_failing_serial<T>['skip'];
-}
-interface Register_afterEach_always_failing_serial_todo<T> {
- cb: Register_afterEach_always_cb_failing_serial<T>['todo'];
-}
-interface Register_afterEach_always_failing_skip<T> {
- serial: Register_afterEach_always_failing_serial_skip<T>;
- cb: Register_afterEach_always_cb_failing_skip<T>;
-}
-interface Register_afterEach_always_failing_todo<T> {
- serial: Register_afterEach_always_failing_serial_todo<T>;
- cb: Register_afterEach_always_cb_failing_todo<T>;
-}
-interface Register_afterEach_always_cb<T> {
- serial: CallbackRegisterBase<T> & Register_afterEach_always_cb_serial<T>;
- skip: CallbackRegisterBase<T> & Register_afterEach_always_cb_skip<T>;
- todo: (name: string) => void;
- failing: CallbackRegisterBase<T> & Register_afterEach_always_cb_failing<T>;
-}
-interface Register_afterEach_always_cb_serial<T> {
- skip: CallbackRegisterBase<T> & Register_afterEach_always_cb_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_afterEach_always_cb_failing_serial<T>;
-}
-interface Register_afterEach_always_cb_serial_skip<T> {
- failing: Register_afterEach_always_cb_failing_serial<T>['skip'];
-}
-interface Register_afterEach_always_cb_serial_todo<T> {
- failing: Register_afterEach_always_cb_failing_serial<T>['todo'];
-}
-interface Register_afterEach_always_cb_skip<T> {
- serial: Register_afterEach_always_cb_serial_skip<T>;
- failing: Register_afterEach_always_cb_failing_skip<T>;
-}
-interface Register_afterEach_always_cb_todo<T> {
- serial: Register_afterEach_always_cb_serial_todo<T>;
- failing: Register_afterEach_always_cb_failing_todo<T>;
-}
-interface Register_afterEach_always_cb_failing<T> {
- serial: CallbackRegisterBase<T> & Register_afterEach_always_cb_failing_serial<T>;
- skip: CallbackRegisterBase<T> & Register_afterEach_always_cb_failing_skip<T>;
- todo: (name: string) => void;
-}
-interface Register_afterEach_always_cb_failing_serial<T> {
- skip: CallbackRegisterBase<T>;
- todo: (name: string) => void;
-}
-interface Register_afterEach_always_cb_failing_skip<T> {
- serial: Register_afterEach_always_cb_failing_serial<T>['skip'];
-}
-interface Register_afterEach_always_cb_failing_todo<T> {
- serial: Register_afterEach_always_cb_failing_serial<T>['todo'];
-}
-interface Register_cb<T> {
- serial: CallbackRegisterBase<T> & Register_cb_serial<T>;
- before: Register_before_cb<T>;
- after: Register_after_cb<T>;
- skip: CallbackRegisterBase<T> & Register_cb_skip<T>;
- todo: (name: string) => void;
- failing: CallbackRegisterBase<T> & Register_cb_failing<T>;
- only: CallbackRegisterBase<T> & Register_cb_only<T>;
- beforeEach: Register_beforeEach_cb<T>;
- afterEach: Register_afterEach_cb<T>;
- always: Register_always_cb<T>;
-}
-interface Register_cb_serial<T> {
- before: Register_before_cb_serial<T>;
- after: Register_after_cb_serial<T>;
- skip: CallbackRegisterBase<T> & Register_cb_serial_skip<T>;
- todo: (name: string) => void;
- failing: Register_cb_failing_serial<T>;
- only: Register_cb_only_serial<T>;
- beforeEach: Register_beforeEach_cb_serial<T>;
- afterEach: Register_afterEach_cb_serial<T>;
- always: Register_always_cb_serial<T>;
-}
-interface Register_cb_serial_skip<T> {
- before: Register_before_cb_serial_skip<T>;
- after: Register_after_cb_serial_skip<T>;
- failing: Register_cb_failing_serial_skip<T>;
- beforeEach: Register_beforeEach_cb_serial_skip<T>;
- afterEach: Register_afterEach_cb_serial_skip<T>;
- always: Register_always_cb_serial_skip<T>;
-}
-interface Register_cb_serial_todo<T> {
- before: Register_before_cb_serial_todo<T>;
- after: Register_after_cb_serial_todo<T>;
- failing: Register_cb_failing_serial_todo<T>;
- beforeEach: Register_beforeEach_cb_serial_todo<T>;
- afterEach: Register_afterEach_cb_serial_todo<T>;
- always: Register_always_cb_serial_todo<T>;
-}
-interface Register_cb_skip<T> {
- serial: Register_cb_serial_skip<T>;
- before: Register_before_cb_skip<T>;
- after: Register_after_cb_skip<T>;
- failing: Register_cb_failing_skip<T>;
- beforeEach: Register_beforeEach_cb_skip<T>;
- afterEach: Register_afterEach_cb_skip<T>;
- always: Register_always_cb_skip<T>;
-}
-interface Register_cb_todo<T> {
- serial: Register_cb_serial_todo<T>;
- before: Register_before_cb_todo<T>;
- after: Register_after_cb_todo<T>;
- failing: Register_cb_failing_todo<T>;
- beforeEach: Register_beforeEach_cb_todo<T>;
- afterEach: Register_afterEach_cb_todo<T>;
- always: Register_always_cb_todo<T>;
-}
-interface Register_cb_failing<T> {
- serial: CallbackRegisterBase<T> & Register_cb_failing_serial<T>;
- before: Register_before_cb_failing<T>;
- after: Register_after_cb_failing<T>;
- skip: CallbackRegisterBase<T> & Register_cb_failing_skip<T>;
- todo: (name: string) => void;
- only: CallbackRegisterBase<T> & Register_cb_failing_only<T>;
- beforeEach: Register_beforeEach_cb_failing<T>;
- afterEach: Register_afterEach_cb_failing<T>;
- always: Register_always_cb_failing<T>;
-}
-interface Register_cb_failing_serial<T> {
- before: Register_before_cb_failing_serial<T>;
- after: Register_after_cb_failing_serial<T>;
- skip: CallbackRegisterBase<T> & Register_cb_failing_serial_skip<T>;
- todo: (name: string) => void;
- only: Register_cb_failing_only<T>['serial'];
- beforeEach: Register_beforeEach_cb_failing_serial<T>;
- afterEach: Register_afterEach_cb_failing_serial<T>;
- always: Register_always_cb_failing_serial<T>;
-}
-interface Register_cb_failing_serial_skip<T> {
- before: Register_before_cb_failing_serial<T>['skip'];
- after: Register_after_cb_failing_serial_skip<T>;
- beforeEach: Register_beforeEach_cb_failing_serial<T>['skip'];
- afterEach: Register_afterEach_cb_failing_serial_skip<T>;
- always: Register_always_cb_failing_serial_skip<T>;
-}
-interface Register_cb_failing_serial_todo<T> {
- before: Register_before_cb_failing_serial<T>['todo'];
- after: Register_after_cb_failing_serial_todo<T>;
- beforeEach: Register_beforeEach_cb_failing_serial<T>['todo'];
- afterEach: Register_afterEach_cb_failing_serial_todo<T>;
- always: Register_always_cb_failing_serial_todo<T>;
-}
-interface Register_cb_failing_skip<T> {
- serial: Register_cb_failing_serial_skip<T>;
- before: Register_before_cb_failing_skip<T>;
- after: Register_after_cb_failing_skip<T>;
- beforeEach: Register_beforeEach_cb_failing_skip<T>;
- afterEach: Register_afterEach_cb_failing_skip<T>;
- always: Register_always_cb_failing_skip<T>;
-}
-interface Register_cb_failing_todo<T> {
- serial: Register_cb_failing_serial_todo<T>;
- before: Register_before_cb_failing_todo<T>;
- after: Register_after_cb_failing_todo<T>;
- beforeEach: Register_beforeEach_cb_failing_todo<T>;
- afterEach: Register_afterEach_cb_failing_todo<T>;
- always: Register_always_cb_failing_todo<T>;
-}
-interface Register_cb_failing_only<T> {
- serial: CallbackRegisterBase<T>;
-}
-interface Register_cb_only<T> {
- serial: CallbackRegisterBase<T> & Register_cb_only_serial<T>;
- failing: Register_cb_failing_only<T>;
-}
-interface Register_cb_only_serial<T> {
- failing: Register_cb_failing_only<T>['serial'];
-}
-interface Register_always<T> {
- after: Register_after_always<T>;
- afterEach: Register_afterEach_always<T>;
-}
-interface Register_always_serial<T> {
- after: Register_after_always_serial<T>;
- failing: Register_always_failing_serial<T>;
- afterEach: Register_afterEach_always_serial<T>;
- cb: Register_always_cb_serial<T>;
-}
-interface Register_always_serial_skip<T> {
- after: Register_after_always_serial_skip<T>;
- failing: Register_always_failing_serial_skip<T>;
- afterEach: Register_afterEach_always_serial_skip<T>;
- cb: Register_always_cb_serial_skip<T>;
-}
-interface Register_always_serial_todo<T> {
- after: Register_after_always_serial_todo<T>;
- failing: Register_always_failing_serial_todo<T>;
- afterEach: Register_afterEach_always_serial_todo<T>;
- cb: Register_always_cb_serial_todo<T>;
-}
-interface Register_always_skip<T> {
- serial: Register_always_serial_skip<T>;
- after: Register_after_always_skip<T>;
- failing: Register_always_failing_skip<T>;
- afterEach: Register_afterEach_always_skip<T>;
- cb: Register_always_cb_skip<T>;
-}
-interface Register_always_todo<T> {
- serial: Register_always_serial_todo<T>;
- after: Register_after_always_todo<T>;
- failing: Register_always_failing_todo<T>;
- afterEach: Register_afterEach_always_todo<T>;
- cb: Register_always_cb_todo<T>;
-}
-interface Register_always_failing<T> {
- after: Register_after_always_failing<T>;
- afterEach: Register_afterEach_always_failing<T>;
- cb: Register_always_cb_failing<T>;
-}
-interface Register_always_failing_serial<T> {
- after: Register_after_always_failing_serial<T>;
- afterEach: Register_afterEach_always_failing_serial<T>;
- cb: Register_always_cb_failing_serial<T>;
-}
-interface Register_always_failing_serial_skip<T> {
- after: Register_after_always_failing_serial_skip<T>;
- afterEach: Register_afterEach_always_failing_serial_skip<T>;
- cb: Register_always_cb_failing_serial_skip<T>;
-}
-interface Register_always_failing_serial_todo<T> {
- after: Register_after_always_failing_serial_todo<T>;
- afterEach: Register_afterEach_always_failing_serial_todo<T>;
- cb: Register_always_cb_failing_serial_todo<T>;
-}
-interface Register_always_failing_skip<T> {
- serial: Register_always_failing_serial_skip<T>;
- after: Register_after_always_failing_skip<T>;
- afterEach: Register_afterEach_always_failing_skip<T>;
- cb: Register_always_cb_failing_skip<T>;
-}
-interface Register_always_failing_todo<T> {
- serial: Register_always_failing_serial_todo<T>;
- after: Register_after_always_failing_todo<T>;
- afterEach: Register_afterEach_always_failing_todo<T>;
- cb: Register_always_cb_failing_todo<T>;
-}
-interface Register_always_cb<T> {
- after: Register_after_always_cb<T>;
- afterEach: Register_afterEach_always_cb<T>;
-}
-interface Register_always_cb_serial<T> {
- after: Register_after_always_cb_serial<T>;
- failing: Register_always_cb_failing_serial<T>;
- afterEach: Register_afterEach_always_cb_serial<T>;
-}
-interface Register_always_cb_serial_skip<T> {
- after: Register_after_always_cb_serial_skip<T>;
- failing: Register_always_cb_failing_serial_skip<T>;
- afterEach: Register_afterEach_always_cb_serial_skip<T>;
-}
-interface Register_always_cb_serial_todo<T> {
- after: Register_after_always_cb_serial_todo<T>;
- failing: Register_always_cb_failing_serial_todo<T>;
- afterEach: Register_afterEach_always_cb_serial_todo<T>;
-}
-interface Register_always_cb_skip<T> {
- serial: Register_always_cb_serial_skip<T>;
- after: Register_after_always_cb_skip<T>;
- failing: Register_always_cb_failing_skip<T>;
- afterEach: Register_afterEach_always_cb_skip<T>;
-}
-interface Register_always_cb_todo<T> {
- serial: Register_always_cb_serial_todo<T>;
- after: Register_after_always_cb_todo<T>;
- failing: Register_always_cb_failing_todo<T>;
- afterEach: Register_afterEach_always_cb_todo<T>;
-}
-interface Register_always_cb_failing<T> {
- after: Register_after_always_cb_failing<T>;
- afterEach: Register_afterEach_always_cb_failing<T>;
-}
-interface Register_always_cb_failing_serial<T> {
- after: Register_after_always_cb_failing_serial<T>;
- afterEach: Register_afterEach_always_cb_failing_serial<T>;
-}
-interface Register_always_cb_failing_serial_skip<T> {
- after: Register_after_always_cb_failing_serial<T>['skip'];
- afterEach: Register_afterEach_always_cb_failing_serial<T>['skip'];
-}
-interface Register_always_cb_failing_serial_todo<T> {
- after: Register_after_always_cb_failing_serial<T>['todo'];
- afterEach: Register_afterEach_always_cb_failing_serial<T>['todo'];
-}
-interface Register_always_cb_failing_skip<T> {
- serial: Register_always_cb_failing_serial_skip<T>;
- after: Register_after_always_cb_failing_skip<T>;
- afterEach: Register_afterEach_always_cb_failing_skip<T>;
-}
-interface Register_always_cb_failing_todo<T> {
- serial: Register_always_cb_failing_serial_todo<T>;
- after: Register_after_always_cb_failing_todo<T>;
- afterEach: Register_afterEach_always_cb_failing_todo<T>;
-}
diff --git a/node_modules/ava/types/make.js b/node_modules/ava/types/make.js
deleted file mode 100644
index 9516fbb61..000000000
--- a/node_modules/ava/types/make.js
+++ /dev/null
@@ -1,184 +0,0 @@
-'use strict';
-
-// TypeScript definitions are generated here.
-// AVA allows chaining of function names, like `test.after.cb.always`.
-// The order of these names is not important.
-// Writing these definitions by hand is hard. Because of chaining,
-// the number of combinations grows fast (2^n). To reduce this number,
-// illegal combinations are filtered out in `verify`.
-// The order of the options is not important. We could generate full
-// definitions for each possible order, but that would give a very big
-// output. Instead, we write an alias for different orders. For instance,
-// `after.cb` is fully written, and `cb.after` is emitted as an alias
-// using `typeof after.cb`.
-
-const path = require('path');
-const fs = require('fs');
-const isArraySorted = require('is-array-sorted');
-const Runner = require('../lib/runner');
-
-const arrayHas = parts => part => parts.indexOf(part) !== -1;
-
-const base = fs.readFileSync(path.join(__dirname, 'base.d.ts'), 'utf8');
-
-// All suported function names
-const allParts = Object.keys(new Runner({}).chain).filter(name => name !== 'test');
-
-// The output consists of the base declarations, the actual 'test' function declarations,
-// and the namespaced chainable methods.
-const output = base + generatePrefixed([]);
-
-fs.writeFileSync(path.join(__dirname, 'generated.d.ts'), output);
-
-// Generates type definitions, for the specified prefix
-// The prefix is an array of function names
-function generatePrefixed(prefix) {
- let output = '';
- let children = '';
-
- for (const part of allParts) {
- const parts = prefix.concat([part]);
-
- if (prefix.indexOf(part) !== -1 || !verify(parts, true)) {
- // Function already in prefix or not allowed here
- continue;
- }
-
- // If `parts` is not sorted, we alias it to the sorted chain
- if (!isArraySorted(parts)) {
- if (exists(parts)) {
- parts.sort();
-
- let chain;
- if (hasChildren(parts)) {
- chain = parts.join('_') + '<T>';
- } else {
- // This is a single function, not a namespace, so there's no type associated
- // and we need to dereference it as a property type
- const last = parts.pop();
- const joined = parts.join('_');
- chain = `${joined}<T>['${last}']`;
- }
-
- output += `\t${part}: Register_${chain};\n`;
- }
-
- continue;
- }
-
- // Check that `part` is a valid function name.
- // `always` is a valid prefix, for instance of `always.after`,
- // but not a valid function name.
- if (verify(parts, false)) {
- if (arrayHas(parts)('todo')) {
- // 'todo' functions don't have a function argument, just a string
- output += `\t${part}: (name: string) => void;\n`;
- } else {
- if (arrayHas(parts)('cb')) {
- output += `\t${part}: CallbackRegisterBase<T>`;
- } else {
- output += `\t${part}: RegisterBase<T>`;
- }
-
- if (hasChildren(parts)) {
- // This chain can be continued, make the property an intersection type with the chain continuation
- const joined = parts.join('_');
- output += ` & Register_${joined}<T>`;
- }
-
- output += ';\n';
- }
- }
-
- children += generatePrefixed(parts);
- }
-
- if (output === '') {
- return children;
- }
-
- const typeBody = `{\n${output}}\n${children}`;
-
- if (prefix.length === 0) {
- // No prefix, so this is the type for the default export
- return `export interface Register<T> extends RegisterBase<T> ${typeBody}`;
- }
- const namespace = ['Register'].concat(prefix).join('_');
- return `interface ${namespace}<T> ${typeBody}`;
-}
-
-// Checks whether a chain is a valid function name (when `asPrefix === false`)
-// or a valid prefix that could contain members.
-// For instance, `test.always` is not a valid function name, but it is a valid
-// prefix of `test.always.after`.
-function verify(parts, asPrefix) {
- const has = arrayHas(parts);
-
- if (has('only') + has('skip') + has('todo') > 1) {
- return false;
- }
-
- const beforeAfterCount = has('before') + has('beforeEach') + has('after') + has('afterEach');
-
- if (beforeAfterCount > 1) {
- return false;
- }
-
- if (beforeAfterCount === 1) {
- if (has('only')) {
- return false;
- }
- }
-
- if (has('always')) {
- // `always` can only be used with `after` or `afterEach`.
- // Without it can still be a valid prefix
- if (has('after') || has('afterEach')) {
- return true;
- }
-
- if (!verify(parts.concat(['after']), false) && !verify(parts.concat(['afterEach']), false)) {
- // If `after` nor `afterEach` cannot be added to this prefix,
- // `always` is not allowed here.
- return false;
- }
-
- // Only allowed as a prefix
- return asPrefix;
- }
-
- return true;
-}
-
-// Returns true if a chain can have any child properties
-function hasChildren(parts) {
- // Concatenate the chain with each other part, and see if any concatenations are valid functions
- const validChildren = allParts
- .filter(newPart => parts.indexOf(newPart) === -1)
- .map(newPart => parts.concat([newPart]))
- .filter(longer => verify(longer, false));
-
- return validChildren.length > 0;
-}
-
-// Checks whether a chain is a valid function name or a valid prefix with some member
-function exists(parts) {
- if (verify(parts, false)) {
- // Valid function name
- return true;
- }
-
- if (!verify(parts, true)) {
- // Not valid prefix
- return false;
- }
-
- // Valid prefix, check whether it has members
- for (const prefix of allParts) {
- if (parts.indexOf(prefix) === -1 && exists(parts.concat([prefix]))) {
- return true;
- }
- }
-
- return false;
-}