-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
* Allow users to configure the snapshot location * Resolve the location through source-maps, in case the tests were precompiled into a build directory, e.g. via TypeScript
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"ava": { | ||
"files": [ | ||
"src/**/*test.js" | ||
], | ||
"snapshotDir": "snapshot-fixtures" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import test from '../../../../../../..'; | ||
|
||
test('test nested feature title', t => { | ||
t.snapshot({foo: 'bar'}); | ||
|
||
t.snapshot({answer: 42}); | ||
}); | ||
|
||
test('another nested feature test', t => { | ||
t.snapshot(new Map()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import test from '../../../../../..'; | ||
|
||
test('test feature title', t => { | ||
t.snapshot({foo: 'bar'}); | ||
|
||
t.snapshot({answer: 42}); | ||
}); | ||
|
||
test('another feature test', t => { | ||
t.snapshot(new Map()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import test from '../../../../..'; | ||
|
||
test('test title', t => { | ||
t.snapshot({foo: 'bar'}); | ||
|
||
t.snapshot({answer: 42}); | ||
}); | ||
|
||
test('another test', t => { | ||
t.snapshot(new Map()); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"ava": { | ||
"files": [ | ||
"build/**/*test.js" | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import test from '../../../../../../..' | ||
|
||
test('feature test title', t => { | ||
t.snapshot({foo: 'bar'}); | ||
|
||
t.snapshot({answer: 40}); | ||
}); | ||
|
||
test('another feature test', t => { | ||
t.snapshot(new Map()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import test from '../../../../..'; | ||
|
||
test('top level test title', t => { | ||
t.snapshot({foo: 'bar'}); | ||
|
||
t.snapshot({answer: 42}); | ||
}); | ||
|
||
test('another top level test', t => { | ||
t.snapshot(new Map()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import test from '../../../../../..'; | ||
|
||
test('test title', t => { | ||
t.snapshot({foo: 'bar'}); | ||
|
||
t.snapshot({answer: 43}); | ||
}); | ||
|
||
test('another test', t => { | ||
t.snapshot(new Map()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "commonjs", | ||
"outDir": "build", | ||
"sourceMap": true | ||
}, | ||
"include": [ | ||
"src/**/*test.ts" | ||
] | ||
} |