Skip to content

Commit 0e6db13

Browse files
committed
minor doc and style tweaks
1 parent d72723b commit 0e6db13

File tree

9 files changed

+15
-24
lines changed

9 files changed

+15
-24
lines changed

.editorconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ insert_final_newline = true
1010
[{package.json,*.yml}]
1111
indent_style = space
1212
indent_size = 2
13-
14-
[*.md]
15-
trim_trailing_whitespace = false

.lgtm

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ node_js:
55
- '0.12'
66
- '0.10'
77
before_install:
8-
- 'npm i -g npm@latest'
8+
- 'npm install -g npm@latest'
99
after_success:
1010
- '[ -z "$COVERALLS_REPO_TOKEN" ] && tap --coverage-report=text-lcov | ./node_modules/.bin/coveralls'

api.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ var chalk = require('chalk');
1111
var objectAssign = require('object-assign');
1212
var commondir = require('commondir');
1313
var resolveCwd = require('resolve-cwd');
14+
var uniqueTempDir = require('unique-temp-dir');
15+
var findCacheDir = require('find-cache-dir');
1416
var AvaError = require('./lib/ava-error');
1517
var fork = require('./lib/fork');
1618
var formatter = require('./lib/enhance-assert').formatter();
1719
var CachingPrecompiler = require('./lib/caching-precompiler');
18-
var uniqueTempDir = require('unique-temp-dir');
19-
var findCacheDir = require('find-cache-dir');
2020

2121
function Api(files, options) {
2222
if (!(this instanceof Api)) {
@@ -96,6 +96,7 @@ Api.prototype._handleTest = function (test) {
9696
if (isError) {
9797
if (test.error.powerAssertContext) {
9898
var message = formatter(test.error.powerAssertContext);
99+
99100
if (test.error.originalMessage) {
100101
message = test.error.originalMessage + ' ' + message;
101102
}
@@ -153,11 +154,10 @@ Api.prototype.run = function () {
153154
var cacheEnabled = self.options.cacheEnabled !== false;
154155
var cacheDir = (cacheEnabled && findCacheDir({name: 'ava', files: files})) ||
155156
uniqueTempDir();
157+
156158
self.options.cacheDir = cacheDir;
157159
self.precompiler = new CachingPrecompiler(cacheDir);
158-
159160
self.fileCount = files.length;
160-
161161
self.base = path.relative('.', commondir('.', files)) + path.sep;
162162

163163
var tests = files.map(self._runFile);

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ install:
77
- ps: Install-Product node $env:nodejs_version
88
- set CI=true
99
- set AVA_APPVEYOR=true
10-
- npm -g install npm@latest || (timeout 30 && npm -g install npm@latest)
10+
- npm install -g npm@latest || (timeout 30 && npm install -g npm@latest)
1111
- set PATH=%APPDATA%\npm;%PATH%
1212
- npm install || (timeout 30 && npm install)
1313
matrix:

cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var resolveCwd = require('resolve-cwd');
88
var localCLI = resolveCwd('ava/cli');
99

1010
if (localCLI && localCLI !== __filename) {
11-
debug('Using local install of AVA.');
11+
debug('Using local install of AVA');
1212
require(localCLI);
1313
return;
1414
}

docs/recipes/code-coverage.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ First, we need a Babel configuration. The following is just an example. You will
6464

6565
There are two important things to note from the example above.
6666

67-
1. We ignore test files because AVA already handles transpiling tests for you.
67+
1. We ignore test files because AVA already handles transpiling tests for you.
6868

69-
2. We specify `inline` source maps for development. This is important for properly generating coverage. Using the `env` section of the Babel configuration allows us to disable source maps for production builds.
69+
2. We specify `inline` source maps for development. This is important for properly generating coverage. Using the `env` section of the Babel configuration allows us to disable source maps for production builds.
7070

7171

7272
### Create a build script
@@ -77,15 +77,15 @@ Since it is unlikely you want `inline` source maps in your production code. You
7777

7878
```json
7979
{
80-
"scripts": {
81-
"build": "BABEL_ENV=production babel --out-dir=dist index.js"
82-
}
80+
"scripts": {
81+
"build": "BABEL_ENV=production babel --out-dir=dist index.js"
82+
}
8383
}
8484
```
8585

8686
> WARNING: `BABEL_ENV=production` does not work on Windows, you must use the `set` keyword (`set BABEL_ENV=production`). For cross platform builds, check out [`cross-env`].
8787
88-
Note that the build script really has very little to do with AVA, and is just a demonstration of how to use Babel's `env` configuration to manipulate your config so it is compatible with AVA.
88+
Note that the build script really has very little to do with AVA, and is just a demonstration of how to use Babel's `env` configuration to manipulate your config so it's compatible with AVA.
8989

9090
### Use the Babel require hook
9191

@@ -167,7 +167,7 @@ Then add the following to your `.travis.yml`:
167167

168168
```yaml
169169
after_success:
170-
- './node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls'
170+
- './node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls'
171171
```
172172

173173
Your coverage report will then appear on coveralls shortly after Travis completes.

docs/recipes/endpoint-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function makeApp() {
1414
}
1515
```
1616

17-
Next, just inject your server instance into supertest. The only gotcha is to use a promise or async/await syntax instead of supertest's `end` method:
17+
Next, just inject your server instance into supertest. The only gotcha is to use a promise or async/await syntax instead of the supertest `end` method:
1818

1919
```js
2020
test('signup:Success', async t => {

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
"url": "sindresorhus.com"
1212
},
1313
"maintainers": [
14-
{
15-
"name": "Sindre Sorhus",
16-
"email": "[email protected]",
17-
"url": "sindresorhus.com"
18-
},
1914
{
2015
"name": "Kevin Mårtensson",
2116
"email": "[email protected]",

0 commit comments

Comments
 (0)