mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-22 17:47:53 +00:00
19 lines
596 B
TypeScript
19 lines
596 B
TypeScript
import 'angular2-universal-polyfills';
|
|
import { assert } from 'chai';
|
|
import { Counter } from '../components/counter/counter';
|
|
|
|
describe('Counter component', () => {
|
|
it('should start with value 0', () => {
|
|
const instance = new Counter();
|
|
assert.equal(instance.currentCount, 0);
|
|
});
|
|
|
|
it('should increment the counter by 1 when requested', () => {
|
|
const instance = new Counter();
|
|
instance.incrementCounter();
|
|
assert.equal(instance.currentCount, 1);
|
|
instance.incrementCounter();
|
|
assert.equal(instance.currentCount, 2);
|
|
});
|
|
});
|