diff options
-rw-r--r-- | spec/javascripts/something.js | 7 | ||||
-rw-r--r-- | spec/javascripts/something_spec.js | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/spec/javascripts/something.js b/spec/javascripts/something.js new file mode 100644 index 00000000000..1aa9b5ec9a1 --- /dev/null +++ b/spec/javascripts/something.js @@ -0,0 +1,7 @@ +export function someFunction() { + throw new Error('someFunction should not be called'); +} + +export function otherFunction() { + someFunction(); +} diff --git a/spec/javascripts/something_spec.js b/spec/javascripts/something_spec.js new file mode 100644 index 00000000000..0868dd90a0f --- /dev/null +++ b/spec/javascripts/something_spec.js @@ -0,0 +1,8 @@ +import * as something from './something'; + +fdescribe('something', () => { + it('does not call someFunction', () => { + spyOn(something, 'someFunction').and.callFake(() => console.log('someFunction was not called! yay!')); + something.otherFunction(); + }); +}); |