mirror of
https://github.com/material-components/material-web.git
synced 2026-03-09 00:09:23 +08:00
23 lines
494 B
TypeScript
23 lines
494 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import 'jasmine';
|
|
|
|
import {Foundation} from './foundation';
|
|
|
|
describe('Foundation', () => {
|
|
it('#init() should be called on construction', () => {
|
|
class MyFoundation extends Foundation<{}> {
|
|
// Make init public to test
|
|
override init() {}
|
|
}
|
|
|
|
spyOn(MyFoundation.prototype, 'init');
|
|
const instance = new MyFoundation({});
|
|
expect(instance.init).toHaveBeenCalled();
|
|
});
|
|
});
|