Upgrade Ava to v4
This commit is contained in:
parent
9a40cc5274
commit
ce89f1b611
1153 changed files with 27264 additions and 95308 deletions
9
node_modules/ava/lib/context-ref.js
generated
vendored
9
node_modules/ava/lib/context-ref.js
generated
vendored
|
|
@ -1,7 +1,4 @@
|
|||
'use strict';
|
||||
const clone = require('lodash/clone');
|
||||
|
||||
class ContextRef {
|
||||
export default class ContextRef {
|
||||
constructor() {
|
||||
this.value = {};
|
||||
}
|
||||
|
|
@ -18,7 +15,6 @@ class ContextRef {
|
|||
return new LateBinding(this);
|
||||
}
|
||||
}
|
||||
module.exports = ContextRef;
|
||||
|
||||
class LateBinding extends ContextRef {
|
||||
constructor(ref) {
|
||||
|
|
@ -29,7 +25,8 @@ class LateBinding extends ContextRef {
|
|||
|
||||
get() {
|
||||
if (!this.bound) {
|
||||
this.set(clone(this.ref.get()));
|
||||
const value = this.ref.get();
|
||||
this.set(value !== null && typeof value === 'object' ? {...value} : value);
|
||||
}
|
||||
|
||||
return super.get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue