Skip to content

test: set up ava and move cd.js#561

Merged
nfischer merged 2 commits intomasterfrom
test-ava-cd
Nov 19, 2016
Merged

test: set up ava and move cd.js#561
nfischer merged 2 commits intomasterfrom
test-ava-cd

Conversation

@nfischer
Copy link
Copy Markdown
Member

Set up ava as the new test framework. Migrate the tests for the cd command to
use the ava framework.

This is the first commit in the plan I suggested in this comment on #512.

Fixes bullet points 1, 2, and 4 of #560

Set up ava as the new test framework. Migrate the tests for the cd command to
use the ava framework.
import path from 'path';
import common from '../src/common';
import fs from 'fs';
import utils from './utils/utils';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we group these imports together? I like to group node stdlib imports, then dependency imports, then local imports. Something like:

import fs from 'fs';
import path from 'path';
import test from 'ava';
import shell from '..';
import common from '../src/common';
import utils from './utils/utils';

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. I'll probably also put newline breaks between sections of the imports

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New format:

  • core modules (alphabetized)
  • npm modules (alphabetized)
  • local files (alphabetized, but with import shell from '..'; first because it needs to be loaded before the others)

package.json Outdated
"eslint-config-airbnb-base": "^3.0.0",
"eslint-plugin-import": "^1.11.1",
"coffee-script": "^1.10.0",
"jscodeshift": "^0.3.28",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this dependency necessary? I thought it was used to convert our tests to ava initially, not sure if it's necessary anymore.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you're probably right. Thanks for pointing this out. I'll remove it and verify.

@nfischer
Copy link
Copy Markdown
Member Author

@freitagbr PTAL

@freitagbr
Copy link
Copy Markdown
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants