Created
November 13, 2016 10:29
-
-
Save tomasperezv/631b8c898396a0df5a9782894e0229d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const originalObject = { | |
testMethod: () => {} | |
}; | |
it('#spy intercepts property gets', () => { | |
const spy = new Spy(); | |
const mock = spy.watch(originalObject); | |
const triggerSetAccess = mock.test; | |
assert.equal(spy.get('test').called, true); | |
assert.equal(spy.get('test').count, 1); | |
assert.equal(spy.get('test').isDefined, true); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment