ava-fixture
Advanced tools
Comparing version
{ | ||
"name": "ava-fixture", | ||
"description": "Write fixture tests with ava", | ||
"version": "0.7.0", | ||
"main": "dist/commonjs/index.js", | ||
"typings": "dist/commonjs/index.d.ts", | ||
"version": "0.8.0", | ||
"main": "dist/es5/index.js", | ||
"module": "dist/es2015/index.js", | ||
"typings": "dist/es5/index.d.ts", | ||
"files": [ | ||
@@ -11,15 +12,21 @@ "dist" | ||
"scripts": { | ||
"build": "npm run clean && npm run build-commonjs", | ||
"build-commonjs": "tsc -p tsconfig.commonjs.json", | ||
"build": "npm run clean && npm run build-es5 && npm run build-es2015", | ||
"build-es5": "tsc -p tsconfig.es5.json", | ||
"build-es2015": "tsc -p tsconfig.es2015.json", | ||
"_bundle": "npm run bundle-rollup && npm run bundle-webpack", | ||
"_bundle-rollup": "rollup --config rollup.config.es2015.js", | ||
"_bundle-webpack": "webpack --config webpack.config.es5.js", | ||
"clean": "rimraf dist", | ||
"coverage": "npm test && nyc check-coverage --branches 85 --functions 85 --lines 85", | ||
"coverage": "nyc --check-coverage --branches 85 --functions 85 --lines 85 npm test", | ||
"coveralls": "nyc report --reporter=text-lcov | coveralls", | ||
"demo": "node scripts/demo.js", | ||
"dependency-check": "dependency-check . --unused --no-dev -i ava && dependency-check . --missing --no-dev", | ||
"lint": "tslint \"src/**/*.ts\"", | ||
"postpublish": "git push", | ||
"prepare": "typings install && npm run build", | ||
"prepare": "npm run build", | ||
"preversion": "git pull && npm run verify", | ||
"test": "npm run clean && tsc && nyc ava", | ||
"_preversion": "git pull && npm run verify && git add -f dist/ava-fixture*", | ||
"test": "rimraf dist-spec && tsc && ava", | ||
"verify": "npm run lint && npm run coverage && npm run build && npm run dependency-check", | ||
"watch": "npm run clean && node scripts/watch.js" | ||
"watch": "rimraf dist-spec && node scripts/watch.js" | ||
}, | ||
@@ -45,7 +52,7 @@ "author": { | ||
"files": [ | ||
"dist/spec/**/*.spec.js" | ||
"dist-spec/**/*.spec.js" | ||
], | ||
"source": [ | ||
"scripts/*.js", | ||
"dist/spec/**/*.js", | ||
"dist-spec/**/*.js", | ||
"*.json" | ||
@@ -63,7 +70,7 @@ ], | ||
"**/fixtures/**/*", | ||
"dist/spec/interfaces.js" | ||
"dist-spec/interfaces.js" | ||
] | ||
}, | ||
"peerDependencies": { | ||
"aurelia-logging": "^1.2.0", | ||
"aurelia-logging": ">=1.2.0", | ||
"ava": ">=0.17.0" | ||
@@ -74,4 +81,5 @@ }, | ||
"@types/node": "^6.0.58", | ||
"assert-order": "^2.2.5", | ||
"aurelia-logging": "^1.2.0", | ||
"aurelia-logging-color": "^0.2.0", | ||
"aurelia-logging-color": "^0.4.10", | ||
"aurelia-polyfills": "^1.1.1", | ||
@@ -83,11 +91,22 @@ "ava": "^0.17.0", | ||
"dependency-check": "^2.7.0", | ||
"eslint": "^3.13.0", | ||
"eslint": "^3.13.1", | ||
"eslint-config-unional": "^0.2.3", | ||
"mkdirp": "^0.5.1", | ||
"nyc": "^10.0.0", | ||
"param-case": "^2.1.0", | ||
"pascal-case": "^2.0.0", | ||
"rimraf": "^2.5.4", | ||
"rollup": "^0.41.4", | ||
"rollup-plugin-commonjs": "^7.0.0", | ||
"rollup-plugin-node-builtins": "^2.0.0", | ||
"rollup-plugin-node-globals": "^1.1.0", | ||
"rollup-plugin-node-resolve": "^2.0.0", | ||
"rollup-plugin-sourcemaps": "^0.4.1", | ||
"rollup-plugin-uglify": "^1.0.1", | ||
"source-map-loader": "^0.1.6", | ||
"tslint": "^4.3.1", | ||
"tslint-config-unional": "^0.6.0", | ||
"typescript": "^2.1.4", | ||
"typings": "^2.1.0" | ||
"typescript": "^2.1.5", | ||
"uglify-js": "github:mishoo/UglifyJS2#harmony", | ||
"webpack": "^2.2.0-rc.4" | ||
}, | ||
@@ -94,0 +113,0 @@ "dependencies": { |
# ava-fixture | ||
[![stable][stable-image]][stable-url] | ||
[![NPM version][npm-image]][npm-url] | ||
@@ -7,2 +8,4 @@ [![NPM downloads][downloads-image]][downloads-url] | ||
[![Coverage Status][coveralls-image]][coveralls-url] | ||
![badge-size-es5-url] | ||
![badge-size-es2015-url] | ||
@@ -45,6 +48,9 @@ Helps you to easily write fixture tests with [`ava`](https://github.com/avajs/ava). | ||
ftest('test title', 'case-1', (t) => { | ||
// t is ava test. | ||
// process.cwd() points to `case-1` | ||
ftest('test title', 'case-1', (t, d) => { | ||
// t is ava test assertion. | ||
t.is(d.casePath, 'path to the case') | ||
// If you need `cwd` at the case path. | ||
process.chdir(d.casePath) | ||
// ...test away | ||
@@ -54,5 +60,11 @@ }); | ||
// test title can be omitted | ||
ftest('case-1', (t) => { | ||
ftest('case-1', (t, d) => { | ||
// ... | ||
}) | ||
// go through each test | ||
ftest.each((t, d) => { | ||
t.is(d.caseName, 'name of the case') | ||
t.is(d.casePath, 'path to the case') | ||
}) | ||
``` | ||
@@ -71,5 +83,10 @@ | ||
btest('test title', 'case-1', (t, d) => { | ||
// t is ava test. | ||
// process.cwd() points to `case-1` | ||
// d.casePath, d.baselinePath, d.resultPath points to respective folder for `case-1` | ||
// t is ava test assertion. | ||
t.is(d.casePath, 'path to the case') | ||
t.is(d.baselinePath, 'path to the baseline of the case') | ||
t.is(d.resultPath, 'where you should put your result') | ||
// If you need `cwd` at the case path. | ||
process.chdir(d.casePath) | ||
// ...do tests | ||
@@ -82,5 +99,19 @@ | ||
// test title can be omitted | ||
btest('case-1', (t) => { | ||
// ... | ||
btest('case-1', (t, d) => { | ||
t.is(d.casePath, 'path to the case') | ||
t.is(d.baselinePath, 'path to the baseline of the case') | ||
t.is(d.resultPath, 'where you should put your result') | ||
return d.match() | ||
}) | ||
// go through each test | ||
ftest.each((t, d) => { | ||
t.is(d.caseName, 'name of the case') | ||
t.is(d.casePath, 'path to the case') | ||
t.is(d.baselinePath, 'path to the baseline of the case') | ||
t.is(d.resultPath, 'where you should put your result') | ||
return d.match() | ||
}) | ||
``` | ||
@@ -100,2 +131,3 @@ | ||
ftest.failing(...) | ||
ftest.only.each.failing(...) | ||
``` | ||
@@ -115,3 +147,3 @@ | ||
# edit `webpack.config.dev.js` to exclude dependencies for the global build. | ||
# edit `webpack.config.es5.js` and `rollup.config.es2015.js` to exclude dependencies for the bundle if needed | ||
@@ -149,4 +181,6 @@ # after making change(s) | ||
Generated by [`generator-unional@0.3.1`](https://github.com/unional/unional-cli) | ||
Generated by [`generator-unional@0.9.0`](https://github.com/unional/unional-cli) | ||
[stable-image]: http://badges.github.io/stability-badges/dist/stable.svg | ||
[stable-url]: http://github.com/badges/stability-badges | ||
[npm-image]: https://img.shields.io/npm/v/ava-fixture.svg?style=flat | ||
@@ -160,1 +194,3 @@ [npm-url]: https://npmjs.org/package/ava-fixture | ||
[coveralls-url]: https://coveralls.io/github/unional/ava-fixture | ||
[badge-size-es5-url]: http://img.badgesize.io/unional/ava-fixture/master/dist/ava-fixture.es5.js.svg?label=es5_size | ||
[badge-size-es2015-url]: http://img.badgesize.io/unional/ava-fixture/master/dist/ava-fixture.es2015.js.svg?label=es2015_size |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
133439
158.55%27
80%1122
172.99%188
23.68%31
63.16%4
300%