replace jest with ava

This commit is contained in:
Robert Brignull 2020-05-04 18:50:13 +01:00
parent 27cc8b23fe
commit 0347b72305
11775 changed files with 84546 additions and 1440575 deletions

40
node_modules/concordance/lib/complexValues/promise.js generated vendored Normal file
View file

@ -0,0 +1,40 @@
'use strict'
const constants = require('../constants')
const object = require('./object')
const DEEP_EQUAL = constants.DEEP_EQUAL
const UNEQUAL = constants.UNEQUAL
function describe (props) {
return new DescribedPromiseValue(props)
}
exports.describe = describe
function deserialize (props) {
return new DeserializedPromiseValue(props)
}
exports.deserialize = deserialize
const tag = Symbol('PromiseValue')
exports.tag = tag
class PromiseValue extends object.ObjectValue {}
Object.defineProperty(PromiseValue.prototype, 'tag', { value: tag })
class DescribedPromiseValue extends object.DescribedMixin(PromiseValue) {
compare (expected) {
// When comparing described promises, require them to be the exact same
// object.
return super.compare(expected) === DEEP_EQUAL
? DEEP_EQUAL
: UNEQUAL
}
}
class DeserializedPromiseValue extends object.DeserializedMixin(PromiseValue) {
compare (expected) {
// Deserialized promises can never be compared using object references.
return super.compare(expected)
}
}