mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(toast): add karma test for toast
This commit is contained in:
23
ionic/components/toast/test/basic/toast.spec.ts
Normal file
23
ionic/components/toast/test/basic/toast.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import {Toast} from '../../../../ionic';
|
||||
|
||||
export function run() {
|
||||
|
||||
describe('Toast', () => {
|
||||
|
||||
describe('create', () => {
|
||||
|
||||
it('should create toast with close button', () => {
|
||||
let toast = Toast.create({
|
||||
message: 'Please Wait...',
|
||||
showCloseButton: true
|
||||
});
|
||||
|
||||
expect(toast.message).toEqual('Please Wait...');
|
||||
expect(toast.showCloseButton).toEqual(true);
|
||||
expect(toast.closeButtonText).toEqual('Close');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user