Skip to content

Commit fac7990

Browse files
committed
Unflag t.like() assertion
1 parent bc39bcc commit fac7990

File tree

7 files changed

+5
-43
lines changed

7 files changed

+5
-43
lines changed

docs/03-assertions.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -215,30 +215,6 @@ Instead AVA derives a *comparable* object from `value`, based on the deeply-nest
215215

216216
Any values in `selector` that are not regular objects should be deeply equal to the corresponding values in `value`.
217217

218-
This is an experimental assertion for the time being. You need to enable it:
219-
220-
**`package.json`**:
221-
222-
```json
223-
{
224-
"ava": {
225-
"nonSemVerExperiments": {
226-
"likeAssertion": true
227-
}
228-
}
229-
}
230-
```
231-
232-
**`ava.config.js`**:
233-
234-
```js
235-
export default {
236-
nonSemVerExperiments: {
237-
likeAssertion: true
238-
}
239-
}
240-
```
241-
242218
In the following example, the `map` property of `value` must be deeply equal to that of `selector`. However `nested.qux` is ignored, because it's not in `selector`.
243219

244220
```js

lib/assert.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -399,15 +399,6 @@ class Assertions {
399399
});
400400

401401
this.like = withSkip((actual, selector, message) => {
402-
if (!experiments.likeAssertion) {
403-
fail(new AssertionError({
404-
assertion: 'like',
405-
improperUsage: true,
406-
message: 'You must enable the `likeAssertion` experiment in order to use `t.like()`'
407-
}));
408-
return;
409-
}
410-
411402
if (!checkMessage('like', message)) {
412403
return;
413404
}

lib/load-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const pkgConf = require('pkg-conf');
77

88
const NO_SUCH_FILE = Symbol('no ava.config.js file');
99
const MISSING_DEFAULT_EXPORT = Symbol('missing default export');
10-
const EXPERIMENTS = new Set(['disableSnapshotsInHooks', 'likeAssertion', 'reverseTeardowns']);
10+
const EXPERIMENTS = new Set(['disableSnapshotsInHooks', 'reverseTeardowns']);
1111

1212
// *Very* rudimentary support for loading ava.config.js files containing an `export default` statement.
1313
const evaluateJsConfig = configFile => {

test-tap/assert.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ const assertions = new class extends assert.Assertions {
3131
lastFailure = error;
3232
},
3333
skip: () => {},
34-
experiments: {
35-
likeAssertion: true
36-
},
34+
experiments: {},
3735
...overwrites
3836
});
3937
}

test-tap/helper/report.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const run = (type, reporter, {match = [], filter} = {}) => {
8888
serial: type === 'failFast' || type === 'failFast2',
8989
require: [],
9090
cacheEnabled: true,
91-
experiments: {likeAssertion: true},
91+
experiments: {},
9292
match,
9393
providers,
9494
projectDir,

test-tap/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ test('log from tests', t => {
648648

649649
test('assertions are bound', t => {
650650
// This does not test .fail() and .snapshot(). It'll suffice.
651-
return withExperiments({likeAssertion: true})(a => {
651+
return ava(a => {
652652
(a.plan)(14);
653653
(a.pass)();
654654
(a.is)(1, 1);

test/assertions/fixtures/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
"ava": {
33
"files": [
44
"*.js"
5-
],
6-
"nonSemVerExperiments": {
7-
"likeAssertion": true
8-
}
5+
]
96
}
107
}

0 commit comments

Comments
 (0)