test.serial('Correct npm version was installed', async t => { const actualNpmVersion = await testUtil.getNpmVersion(); t.is(actualNpmVersion, process.env.NPM_VERSION); });
test('foo bundle does not contain any ava dependencies', async t => { const bundler = bundlerFactory(path.join(__dirname, '..'), false); const file = await bundler.bundleFile(fixture('test', 'foo')); const fileRows = browserUnpack(file); t.is(fileRows.length, sharedBluebird ? 2 : 3); });
test('feedback while in state createCompleted w/o error', t => { const response = {test: true}; inst._state.setAsCreateCompleted(response); t.is(inst.setAsFeedback().feedback, true); t.deepEqual(pick(inst._state.optionsManifest(), ['feedback']), { feedback: true }); t.is(inst.getCreateResponse(), response); });
test('not_handled for update without state prerequisites', t => { t.is(inst.setAsHandled().not_handled, false); t.deepEqual(pick(inst._state.optionsManifest(), ['not_handled']), { not_handled: false }); });
test('getNames', async t => { const names = await m(url, 'name'); names.data.playlist.forEach((name, i) => { t.is(name, mock.names[i]); }); });
test('feedback while in state cannotBeUpdated', t => { inst._state.setAsCreateCompleted(); inst._state.setAsCreateErrored(new Error(STUB)); t.is(inst.setAsFeedback().feedback, true); t.deepEqual(pick(inst._state.optionsManifest(), ['feedback']), { feedback: false }); });
test('setAsUpdateCompleted', t => { const bdy = {ack: true}; inst.setAsUpdateCompleted(bdy); t.is(inst.updateEntryCompleted(), true, 'Should have set the update.completed property to true'); t.deepEqual(inst.getUpdateResponse(), bdy, 'The value of the response should be the IV given at invocation'); });
test( 'validateNotHandled should return false given not_handled is true and type is agent', t => { t.is(inst.setAsTypeAgent().setAsNotHandled().validateNotHandled(), false); } );
test('bar', t => { var a = {foo: 'foo'}; var b = {bar: 'bar'}; t.is(a.foo, b.bar); });
test('not_handled while in state createCompleted w/o error', t => { inst._state.setAsCreateCompleted(); t.is(inst.setAsHandled().not_handled, false); t.deepEqual(pick(inst._state.optionsManifest(), ['not_handled']), { not_handled: true }); });
test('ignores non-git repo info', t => { const pkgJSON = { repository: { type: 'svn', url: 'https://some-repository.com/some-user/some-repo' } }; t.is(api.getProjectUserRepo(pkgJSON), null); });
test('getDurations', async t => { const durations = await m(url, 'duration'); durations.data.playlist.forEach((duration, i) => { t.is(duration, mock.durations[i]); }); });
test('feedback while in state createCompleted w/o error', t => { inst._state.setAsCreateCompleted(); t.is(inst.setAsNotFeedback().feedback, false); t.deepEqual(pick(inst._state.optionsManifest(), ['feedback']), { feedback: true }); });
test('ignores Gist repo info', t => { const pkgJSON = { repository: 'gist:some-gist' }; t.is(api.getProjectUserRepo(pkgJSON), null); });