Move spec files back out of spec/javascripts
- Jasmine gem allows us to specify a path to jasmine.yml via ENV [finish #58126010]
This commit is contained in:
13
spec/core/TimerSpec.js
Normal file
13
spec/core/TimerSpec.js
Normal file
@@ -0,0 +1,13 @@
|
||||
describe("Timer", function() {
|
||||
it("reports the time elapsed", function() {
|
||||
var fakeNow = jasmine.createSpy('fake Date.now'),
|
||||
timer = new j$.Timer({now: fakeNow});
|
||||
|
||||
fakeNow.and.returnValue(100);
|
||||
timer.start();
|
||||
|
||||
fakeNow.and.returnValue(200);
|
||||
|
||||
expect(timer.elapsed()).toEqual(100);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user