diff --git a/docs/03-assertions.md b/docs/03-assertions.md index 1e0a46dd4..40e1777c8 100644 --- a/docs/03-assertions.md +++ b/docs/03-assertions.md @@ -215,30 +215,6 @@ Instead AVA derives a *comparable* object from `value`, based on the deeply-nest Any values in `selector` that are not regular objects should be deeply equal to the corresponding values in `value`. -This is an experimental assertion for the time being. You need to enable it: - -**`package.json`**: - -```json -{ - "ava": { - "nonSemVerExperiments": { - "likeAssertion": true - } - } -} -``` - -**`ava.config.js`**: - -```js -export default { - nonSemVerExperiments: { - likeAssertion: true - } -} -``` - 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`. ```js diff --git a/lib/assert.js b/lib/assert.js index 2282f7aff..fe8f1bfa3 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -399,15 +399,6 @@ class Assertions { }); this.like = withSkip((actual, selector, message) => { - if (!experiments.likeAssertion) { - fail(new AssertionError({ - assertion: 'like', - improperUsage: true, - message: 'You must enable the `likeAssertion` experiment in order to use `t.like()`' - })); - return; - } - if (!checkMessage('like', message)) { return; } diff --git a/lib/load-config.js b/lib/load-config.js index f84983b4b..77fd7e92f 100644 --- a/lib/load-config.js +++ b/lib/load-config.js @@ -7,7 +7,7 @@ const pkgConf = require('pkg-conf'); const NO_SUCH_FILE = Symbol('no ava.config.js file'); const MISSING_DEFAULT_EXPORT = Symbol('missing default export'); -const EXPERIMENTS = new Set(['disableSnapshotsInHooks', 'likeAssertion', 'reverseTeardowns']); +const EXPERIMENTS = new Set(['disableSnapshotsInHooks', 'reverseTeardowns']); // *Very* rudimentary support for loading ava.config.js files containing an `export default` statement. const evaluateJsConfig = configFile => { diff --git a/test-tap/assert.js b/test-tap/assert.js index d817945ce..f5b38cbdf 100644 --- a/test-tap/assert.js +++ b/test-tap/assert.js @@ -31,9 +31,7 @@ const assertions = new class extends assert.Assertions { lastFailure = error; }, skip: () => {}, - experiments: { - likeAssertion: true - }, + experiments: {}, ...overwrites }); } diff --git a/test-tap/helper/report.js b/test-tap/helper/report.js index 95f2a6ad3..b374dd6fa 100644 --- a/test-tap/helper/report.js +++ b/test-tap/helper/report.js @@ -88,7 +88,7 @@ const run = (type, reporter, {match = [], filter} = {}) => { serial: type === 'failFast' || type === 'failFast2', require: [], cacheEnabled: true, - experiments: {likeAssertion: true}, + experiments: {}, match, providers, projectDir, diff --git a/test-tap/test.js b/test-tap/test.js index af70bcf1c..c534f9a84 100644 --- a/test-tap/test.js +++ b/test-tap/test.js @@ -648,7 +648,7 @@ test('log from tests', t => { test('assertions are bound', t => { // This does not test .fail() and .snapshot(). It'll suffice. - return withExperiments({likeAssertion: true})(a => { + return ava(a => { (a.plan)(14); (a.pass)(); (a.is)(1, 1); diff --git a/test/assertions/fixtures/package.json b/test/assertions/fixtures/package.json index be89e4c8d..f9b9cb835 100644 --- a/test/assertions/fixtures/package.json +++ b/test/assertions/fixtures/package.json @@ -2,9 +2,6 @@ "ava": { "files": [ "*.js" - ], - "nonSemVerExperiments": { - "likeAssertion": true - } + ] } }