Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Jun 27, 2020
1 parent ab713a6 commit f6932ad
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -33,6 +33,7 @@
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/polyfill": "^7.10.1",
"@babel/preset-env": "^7.9.0",
"@babel/register": "^7.9.0",
"@continuous-auth/semantic-release-npm": "^2.0.0",
Expand Down
10 changes: 6 additions & 4 deletions test/install_spec.js
@@ -1,5 +1,6 @@
// Pre-run
import chai from 'chai';
import '@babel/polyfill';
import chai, { expect } from 'chai';
import chaiAsPromised from 'chai-as-promised';
import chaiFs from 'chai-fs';
import { given } from 'mocha-testdata';
Expand All @@ -16,9 +17,10 @@ chai.should();

describe('Extension Installer', () => {
describe('when given a valid extension ID', () => {
given(...knownExtensions).it('should resolve the extension successfully', (item) =>
installExtension(item.id).should.become(item.description),
);
given(...knownExtensions).it('should resolve the extension successfully', async (item) => {
const result = await installExtension(item.id);
expect(result).to.equal(item.description);
});

describe('when attempting to install the same extension twice', () => {
it('should resolve the promise', (done) => {
Expand Down
16 changes: 8 additions & 8 deletions test/testdata/knownExtensions.js
Expand Up @@ -41,18 +41,18 @@ const knownExtensions = [
...REDUX_DEVTOOLS,
description: 'Redux DevTools',
},
{
...REACT_PERF,
description: 'React Perf',
},
// {
// ...REACT_PERF,
// description: 'React Perf',
// },
{
...CYCLEJS_DEVTOOL,
description: 'Cycle.js',
},
{
...APOLLO_DEVELOPER_TOOLS,
description: 'Apollo Client Developer Tools',
},
// {
// ...APOLLO_DEVELOPER_TOOLS,
// description: 'Apollo Client Developer Tools',
// },
{
...MOBX_DEVTOOLS,
description: 'MobX Developer Tools',
Expand Down
13 changes: 13 additions & 0 deletions yarn.lock
Expand Up @@ -641,6 +641,14 @@
"@babel/helper-create-regexp-features-plugin" "^7.8.3"
"@babel/helper-plugin-utils" "^7.8.3"

"@babel/polyfill@^7.10.1":
version "7.10.1"
resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.10.1.tgz#d56d4c8be8dd6ec4dce2649474e9b707089f739f"
integrity sha512-TviueJ4PBW5p48ra8IMtLXVkDucrlOZAIZ+EXqS3Ot4eukHbWiqcn7DcqpA1k5PcKtmJ4Xl9xwdv6yQvvcA+3g==
dependencies:
core-js "^2.6.5"
regenerator-runtime "^0.13.4"

"@babel/preset-env@^7.9.0":
version "7.9.0"
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.0.tgz#a5fc42480e950ae8f5d9f8f2bbc03f52722df3a8"
Expand Down Expand Up @@ -1681,6 +1689,11 @@ core-js-compat@^3.6.2:
browserslist "^4.8.3"
semver "7.0.0"

core-js@^2.6.5:
version "2.6.11"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==

core-js@^3.6.4:
version "3.6.4"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647"
Expand Down

0 comments on commit f6932ad

Please sign in to comment.