.
Size: a a a
.
D
test(`Interval.plus() doesn't mofify operands`, () => {
const { int1, int2 } = ['2:28', '2:29.1'].map(s => Interval.fromString(s));
const s1 = int1.toString();
const s2 = int2.toString();
int1.plus(int2);
expect(int1.toString()).toBe(s1);
expect(int2.toString()).toBe(s2);
});
AE
AE
test(`Interval.plus() doesn't mofify operands`, () => {
const { int1, int2 } = ['2:28', '2:29.1'].map(s => Interval.fromString(s));
const s1 = int1.toString();
const s2 = int2.toString();
int1.plus(int2);
expect(int1.toString()).toBe(s1);
expect(int2.toString()).toBe(s2);
});
.
R
СП
R
R
СП
СП
SI
j
test(`Interval.plus() doesn't mofify operands`, () => {
const { int1, int2 } = ['2:28', '2:29.1'].map(s => Interval.fromString(s));
const s1 = int1.toString();
const s2 = int2.toString();
int1.plus(int2);
expect(int1.toString()).toBe(s1);
expect(int2.toString()).toBe(s2);
});
class Test {
constructor () {
this._value = 1
}
methodA () {
console.log('methodA')
this._value = 2
return true
}
methodB () {
console.log('methodB')
return true
}
}
const instance = new Test()
const proxy = new Proxy(instance, {
set: (obj, prop, value) => {
console.log('trying to change the value')
return Reflect.set(obj, prop, value)
}
})
proxy.methodA()
proxy.methodB()
console.log('change directly')
proxy._value = 3
R
R
.
AE
R
.