Skip to content

Commit

Permalink
Finalize protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
novemberborn committed Jan 18, 2020
1 parent 1ece035 commit bcb87e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function isValidPatterns(patterns) {
}

module.exports = ({negotiateProtocol}) => {
const protocol = negotiateProtocol(['ava-3-pre'], {version: pkg.version});
const protocol = negotiateProtocol(['ava-3'], {version: pkg.version});
if (protocol === null) {
return;
}
Expand Down
8 changes: 4 additions & 4 deletions test/protocol-ava-3.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const makeProvider = require('..');

const withProvider = (t, run) => run(t, makeProvider({
negotiateProtocol(identifiers, {version}) {
t.true(identifiers.includes('ava-3-pre'));
t.true(identifiers.includes('ava-3'));
t.is(version, pkg.version);
return {
ava: {version: '2.4.0'},
identifier: 'ava-3-pre',
ava: {version: '3.0.0'},
identifier: 'ava-3',
normalizeGlobPatterns: patterns => patterns,
async findFiles({patterns}) {
return patterns.map(file => path.join(__dirname, file));
Expand Down Expand Up @@ -117,7 +117,7 @@ test('worker(): load compiled files', withProvider, async (t, provider) => {
for await (const file of ['esm-import.cjs', 'esm-import.js']) {
const {stdout, stderr} = await execa.node(
path.join(__dirname, 'fixtures/install-and-load'),
['ava-3-pre', JSON.stringify(state), file],
['ava-3', JSON.stringify(state), file],
{cwd: path.join(__dirname, 'fixtures')}
);
if (stderr.length > 0) {
Expand Down

0 comments on commit bcb87e9

Please sign in to comment.