build(deps-dev): bump eslint-plugin-jest from 22.5.1 to 23.8.1

Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 22.5.1 to 23.8.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v22.5.1...v23.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
This commit is contained in:
dependabot-preview[bot] 2020-03-05 07:55:25 +00:00 committed by Michael Bradley
parent 7b471074e3
commit dcaa2626d9
24 changed files with 161 additions and 105 deletions

View File

@ -73,7 +73,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0",

View File

@ -3,6 +3,8 @@ import sinon from 'sinon';
import { fakeEmbark } from 'embark-testing';
import CodeRunner from '../src/';
/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["assert", "expect"] }] */
// Due to our `DAPP_PATH` dependency in `embark-utils` `dappPath()`, we need to
// ensure that this environment variable is defined.
process.env.DAPP_PATH = 'something';
@ -40,5 +42,6 @@ describe('core/code-runner', () => {
// `runcode:eval` throws a `ReferenceError` if `testVar` wasn't registered
// in the VM.
await embark.events.request2('runcode:eval', `testVar.foo = 'bar';`);
assert(true);
});
});

View File

@ -69,7 +69,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0",

View File

@ -1,17 +1,17 @@
import assert from 'assert';
import { fakeEmbark } from 'embark-testing';
import Console from '../src';
import { version } from '../package.json';
/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["assert", "expect"] }] */
// Due to our `DAPP_PATH` dependency in `embark-utils` `dappPath()`, we need to
// ensure that this environment variable is defined.
process.env.DAPP_PATH = 'something';
describe('core/console', () => {
const { embark } = fakeEmbark();
let console;
beforeEach(() => {
@ -28,12 +28,14 @@ describe('core/console', () => {
embark.teardown();
});
it('it should provide a help text', (done) => {
console.executeCmd('help', (_err, output) => {
let lines = output.split('\n');
assert.equal(lines[0], 'Welcome to Embark ' + version);
assert.equal(lines[2], 'possible commands are:');
done();
it('it should provide a help text', () => {
return new Promise(done => {
console.executeCmd('help', (_err, output) => {
let lines = output.split('\n');
assert.equal(lines[0], 'Welcome to Embark ' + version);
assert.equal(lines[2], 'possible commands are:');
done();
});
});
});
});

View File

@ -63,7 +63,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0",

View File

@ -2,6 +2,8 @@ import assert from 'assert';
import sinon from 'sinon';
import { fakeEmbark } from 'embark-testing';
/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["assert", "expect"] }] */
describe('core/logger', () => {
const { embark } = fakeEmbark();

View File

@ -96,7 +96,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0"

View File

@ -63,7 +63,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0"

View File

@ -8,7 +8,6 @@ describe('embark-ens', () => {
const { embark } = fakeEmbark();
beforeEach(() => {
embark.events.setCommandHandler('namesystem:node:register', () => {});
embark.config.blockchainConfig = { enabled: true };
@ -31,44 +30,50 @@ describe('embark-ens', () => {
embark.teardown();
});
it("should register the right artifact", (done) => {
const pipelineRegisterHandler = jest.fn(async (args, cb) => {
ens.getEnsConfig((err, config) => {
expect(args).toEqual({
path: ['test-dir', 'config'],
file: 'namesystem.json',
format: 'json',
dappAutoEnable: true,
content: Object.assign({}, embark.config.namesystemConfig, config)
it("should register the right artifact", () => {
return new Promise(done => {
const pipelineRegisterHandler = jest.fn((args, cb) => {
ens.getEnsConfig((err, config) => {
expect(args).toEqual({
path: ['test-dir', 'config'],
file: 'namesystem.json',
format: 'json',
dappAutoEnable: true,
content: Object.assign({}, embark.config.namesystemConfig, config)
});
cb();
done();
});
cb();
done();
});
embark.events.setCommandHandler('pipeline:register', pipelineRegisterHandler);
ens.addArtifactFile({}, () => {});
});
embark.events.setCommandHandler('pipeline:register', pipelineRegisterHandler);
ens.addArtifactFile({}, () => {});
});
describe('safeRegisterSubDomain', () => {
it('should register if the name is not registered', (done) => {
ens.ensResolve = jest.fn((name, cb) => { cb(null, null); });
ens.registerSubDomain = jest.fn((defaultAccount, subDomainName, reverseNode, address, secureSend, callback) => callback());
it('should register if the name is not registered', () => {
return new Promise(done => {
ens.ensResolve = jest.fn((name, cb) => { cb(null, null); });
ens.registerSubDomain = jest.fn((defaultAccount, subDomainName, reverseNode, address, secureSend, callback) => callback());
ens.safeRegisterSubDomain('test.eth', '0x0123', '0x4321', () => {
expect(ens.registerSubDomain).toHaveBeenCalledWith('0x4321', 'test.eth', '0xd523d7aaff8eefa323a17f2c79662ff1a8d952f6fa9cf53986347e99ada8098c', '0x0123', secureSend, expect.any(Function));
done();
ens.safeRegisterSubDomain('test.eth', '0x0123', '0x4321', () => {
expect(ens.registerSubDomain).toHaveBeenCalledWith('0x4321', 'test.eth', '0xd523d7aaff8eefa323a17f2c79662ff1a8d952f6fa9cf53986347e99ada8098c', '0x0123', secureSend, expect.any(Function));
done();
});
});
});
it('should not register if the name is already registered', (done) => {
ens.ensResolve = jest.fn((name, cb) => { cb(null, '0x0123'); });
ens.registerSubDomain = jest.fn((defaultAccount, subDomainName, reverseNode, address, secureSend, callback) => callback());
it('should not register if the name is already registered', () => {
return new Promise(done => {
ens.ensResolve = jest.fn((name, cb) => { cb(null, '0x0123'); });
ens.registerSubDomain = jest.fn((defaultAccount, subDomainName, reverseNode, address, secureSend, callback) => callback());
ens.safeRegisterSubDomain('test.eth', '0x0123', '0x4321', () => {
expect(ens.registerSubDomain).not.toHaveBeenCalled();
done();
ens.safeRegisterSubDomain('test.eth', '0x0123', '0x4321', () => {
expect(ens.registerSubDomain).not.toHaveBeenCalled();
done();
});
});
});
});

View File

@ -60,7 +60,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0",

View File

@ -6,6 +6,8 @@ import ScriptsRunnerPlugin, { ScriptsRunnerCommand } from '../src/';
import { file as tmpFile, dir as tmpDir } from 'tmp-promise';
import { promises } from 'fs';
/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["assert", "expect"] }] */
// Due to our `DAPP_PATH` dependency in `embark-utils` `dappPath()`, we need to
// ensure that this environment variable is defined.
process.env.DAPP_PATH = 'something';
@ -86,17 +88,19 @@ describe('plugins/scripts-runner', () => {
sinon.restore();
});
it('should execute script', async (done) => {
it('should execute script', async () => {
const scriptFile = await prepareScriptFile(`module.exports = () => { return 'done'; }`);
embark.events.request(ScriptsRunnerCommand.Execute, scriptFile.path, false, (err, result) => {
assert.equal(result, 'done');
scriptFile.cleanup();
done();
return new Promise(done => {
embark.events.request(ScriptsRunnerCommand.Execute, scriptFile.path, false, (err, result) => {
assert.equal(result, 'done');
scriptFile.cleanup();
done();
});
});
});
it('should execute all scripts in a directory', async (done) => {
it('should execute all scripts in a directory', async () => {
const scriptsDir = await tmpDir();
// eslint-disable-next-line no-unused-vars
@ -111,15 +115,17 @@ describe('plugins/scripts-runner', () => {
scriptsDir.path
);
embark.events.request(ScriptsRunnerCommand.Execute, scriptsDir.path, false, (err, result) => {
assert.ok(result.includes('done'));
assert.ok(result.includes('done2'));
scriptsDir.cleanup();
done();
return new Promise(done => {
embark.events.request(ScriptsRunnerCommand.Execute, scriptsDir.path, false, (err, result) => {
assert.ok(result.includes('done'));
assert.ok(result.includes('done2'));
scriptsDir.cleanup();
done();
});
});
});
it('should force track scripts if --track option is applied', async (done) => {
it('should force track scripts if --track option is applied', async () => {
const scriptFile = await prepareScriptFile(`module.exports = () => { return 'done'; }`);
const expectedResult = {
@ -128,16 +134,18 @@ describe('plugins/scripts-runner', () => {
forceTracking: true
};
embark.events.request(ScriptsRunnerCommand.Execute, scriptFile.path, true, (err, result) => {
assert.equal(result, 'done');
assert(testTracker.track.calledOnce);
assert(testTracker.track.calledWith(expectedResult));
scriptFile.cleanup();
done();
return new Promise(done => {
embark.events.request(ScriptsRunnerCommand.Execute, scriptFile.path, true, (err, result) => {
assert.equal(result, 'done');
assert(testTracker.track.calledOnce);
assert(testTracker.track.calledWith(expectedResult));
scriptFile.cleanup();
done();
});
});
});
it('should track automatically if script directory equals migrations directory', async (done) => {
it('should track automatically if script directory equals migrations directory', async () => {
const scriptsDir = await tmpDir();
const migrationsDir = path.join(scriptsDir.path, embark.config.embarkConfig.migrations);
@ -154,20 +162,24 @@ describe('plugins/scripts-runner', () => {
forceTracking: false
};
embark.events.request(ScriptsRunnerCommand.Execute, scriptFile.path, false, (err, result) => {
assert.equal(result, 'done');
assert(testTracker.track.calledOnce);
assert(testTracker.track.calledWith(expectedResult));
done();
return new Promise(done => {
embark.events.request(ScriptsRunnerCommand.Execute, scriptFile.path, false, (err, result) => {
assert.equal(result, 'done');
assert(testTracker.track.calledOnce);
assert(testTracker.track.calledWith(expectedResult));
done();
});
});
});
it('should not execute script if it was tracked', async(done) => {
it('should not execute script if it was tracked', async() => {
const scriptFile = await prepareScriptFile(`module.exports = () => { return 'done'; }`);
embark.events.request(ScriptsRunnerCommand.Execute, scriptFile.path, true, (err, result) => {
assert.equal(result, undefined);
done();
return new Promise(done => {
embark.events.request(ScriptsRunnerCommand.Execute, scriptFile.path, true, (err, result) => {
assert.equal(result, undefined);
done();
});
});
});
});

View File

@ -66,7 +66,7 @@
"eslint": "6.8.0",
"eslint-config-prettier": "6.1.0",
"eslint-plugin-import": "2.20.1",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"eslint-plugin-prettier": "3.1.0",
"jest": "25.1.0",
"npm-run-all": "4.1.5",

View File

@ -57,7 +57,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0",
"tslint": "5.20.1",

View File

@ -1,8 +1,5 @@
import assert from 'assert';
describe('plugins/suggestions', () => {
it('should run test', () => {
assert.ok(true);
expect(true).toBe(true);
});
});

View File

@ -68,7 +68,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0",

View File

@ -61,7 +61,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0",

View File

@ -3,6 +3,8 @@ import assert from 'assert';
import { fakeEmbark } from 'embark-testing';
import Communication from '../src/';
/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["assert", "expect"] }] */
describe('stack/communication', () => {
// eslint-disable-next-line no-unused-vars

View File

@ -66,7 +66,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0",

View File

@ -6,6 +6,8 @@ import Compiler from '../src/';
const { embark, plugins } = fakeEmbark();
/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["assert", "expect"] }] */
// Due to our `DAPP_PATH` dependency in `embark-utils` `dappPath()`, we need to
// ensure that this environment variable is defined.
process.env.DAPP_PATH = 'something';
@ -24,7 +26,7 @@ describe('stack/compiler', () => {
sinon.restore();
});
test('it should use registered compiler', done => {
test('it should use registered compiler', () => {
const fooCompiler = sinon.spy((files, options, cb) => cb(null, {
contractA: 'someResultA',
contractB: 'someResultB',
@ -33,39 +35,45 @@ describe('stack/compiler', () => {
embark.plugins.createPlugin('fooCompiler').registerCompiler('.foo', fooCompiler);
embark.events.request('compiler:contracts:compile', [
new File({filename: 'foo.foo', type: Types.dappFile, path: 'foo.foo'}),
new File({filename: 'foo2.foo', type: Types.dappFile, path: 'foo2.foo'}),
new File({filename: 'foo3.foo', type: Types.dappFile, path: 'foo3.foo'})
], () => {
assert(fooCompiler.called);
done();
return new Promise(done => {
embark.events.request('compiler:contracts:compile', [
new File({filename: 'foo.foo', type: Types.dappFile, path: 'foo.foo'}),
new File({filename: 'foo2.foo', type: Types.dappFile, path: 'foo2.foo'}),
new File({filename: 'foo3.foo', type: Types.dappFile, path: 'foo3.foo'})
], () => {
assert(fooCompiler.called);
done();
});
});
});
test('it should iterate over available compilers to find a match for a given source file', done => {
test('it should iterate over available compilers to find a match for a given source file', () => {
const fooCompiler = sinon.spy((files, options, cb) => cb(null, { fooContract: 'foo' }));
const barCompiler = sinon.spy((files, options, cb) => cb(null, { barContract: 'bar' }));
embark.plugins.createPlugin('fooCompiler').registerCompiler('.foo', fooCompiler);
embark.plugins.createPlugin('barCompiler').registerCompiler('.bar', barCompiler);
embark.events.request('compiler:contracts:compile', [new File({filename: 'foo.bar', type: Types.dappFile, path: 'foo.bar'})], () => {
assert(fooCompiler.notCalled);
assert(barCompiler.called);
done();
return new Promise(done => {
embark.events.request('compiler:contracts:compile', [new File({filename: 'foo.bar', type: Types.dappFile, path: 'foo.bar'})], () => {
assert(fooCompiler.notCalled);
assert(barCompiler.called);
done();
});
});
});
test('it should not compile source files if there is no matching compiler', done => {
test('it should not compile source files if there is no matching compiler', () => {
const fooCompiler = sinon.spy((files, options, cb) => cb(null, { fooContract: 'foo' }));
embark.plugins.createPlugin('fooCompiler').registerCompiler('.foo', fooCompiler);
const files = [new File({filename: 'foo.bar', type: Types.dappFile, path: 'foo.bar'})];
embark.events.request('compiler:contracts:compile', files, () => {
files.forEach(file => assert(!file.compiled));
done();
return new Promise(done => {
embark.events.request('compiler:contracts:compile', files, () => {
files.forEach(file => assert(!file.compiled));
done();
});
});
});
});

View File

@ -64,7 +64,7 @@
"embark-solo": "^5.2.3",
"embark-testing": "^5.3.0-nightly.4",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"npm-run-all": "4.1.5",
"rimraf": "3.0.0",

View File

@ -3,6 +3,8 @@ import assert from 'assert';
import { fakeEmbark } from 'embark-testing';
import Deployment from '../src/';
/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["assert", "expect"] }] */
describe('stack/deployment', () => {
const { embark, plugins } = fakeEmbark();

View File

@ -64,7 +64,7 @@
"babel-jest": "24.9.0",
"embark-solo": "^5.2.3",
"eslint": "6.8.0",
"eslint-plugin-jest": "22.5.1",
"eslint-plugin-jest": "23.8.1",
"jest": "25.1.0",
"lodash.clonedeep": "4.5.0",
"npm-run-all": "4.1.5",

View File

@ -1,6 +1,5 @@
describe('Testing', () => {
it('should have tests, please write them', (done) => {
it('should have tests, please write them', () => {
expect(true).toBe(true);
done();
});
});

View File

@ -4468,6 +4468,15 @@
"@typescript-eslint/typescript-estree" "2.3.1"
eslint-scope "^5.0.0"
"@typescript-eslint/experimental-utils@^2.5.0":
version "2.22.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.22.0.tgz#4d00c91fbaaa68e56e7869be284999a265707f85"
integrity sha512-sJt1GYBe6yC0dWOQzXlp+tiuGglNhJC9eXZeC8GBVH98Zv9jtatccuhz0OF5kC/DwChqsNfghHx7OlIDQjNYAQ==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "2.22.0"
eslint-scope "^5.0.0"
"@typescript-eslint/parser@2.20.0":
version "2.20.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.20.0.tgz#608e5bb06ba98a415b64ace994c79ab20f9772a9"
@ -4501,6 +4510,19 @@
semver "^6.3.0"
tsutils "^3.17.1"
"@typescript-eslint/typescript-estree@2.22.0":
version "2.22.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.22.0.tgz#a16ed45876abf743e1f5857e2f4a1c3199fd219e"
integrity sha512-2HFZW2FQc4MhIBB8WhDm9lVFaBDy6h9jGrJ4V2Uzxe/ON29HCHBTj3GkgcsgMWfsl2U5as+pTOr30Nibaw7qRQ==
dependencies:
debug "^4.1.1"
eslint-visitor-keys "^1.1.0"
glob "^7.1.6"
is-glob "^4.0.1"
lodash "^4.17.15"
semver "^6.3.0"
tsutils "^3.17.1"
"@typescript-eslint/typescript-estree@2.3.1":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.3.1.tgz#62c64f149948473d06a129dc33b4fc76e6c051f9"
@ -9367,10 +9389,12 @@ eslint-plugin-import@~2.2.0:
minimatch "^3.0.3"
pkg-up "^1.0.0"
eslint-plugin-jest@22.5.1:
version "22.5.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.5.1.tgz#a31dfe9f9513c6af7c17ece4c65535a1370f060b"
integrity sha512-c3WjZR/HBoi4GedJRwo2OGHa8Pzo1EbSVwQ2HFzJ+4t2OoYM7Alx646EH/aaxZ+9eGcPiq0FT0UGkRuFFx2FHg==
eslint-plugin-jest@23.8.1:
version "23.8.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-23.8.1.tgz#247025e8a51b3a25a4cc41166369b0bfb4db83b7"
integrity sha512-OycLNqPo/2EfO6kTqnmsu1khz1gTIOxGl3ThIVwL5/oycDF4pm5uNDyvFelNLdpr4COUuM8PVi3963NEG1Efpw==
dependencies:
"@typescript-eslint/experimental-utils" "^2.5.0"
eslint-plugin-jsx-a11y@6.2.3:
version "6.2.3"