mirror of https://github.com/keeweb/keeweb.git
16 lines
446 B
JavaScript
16 lines
446 B
JavaScript
import { expect } from 'chai';
|
|
import { Model } from 'framework/model';
|
|
|
|
describe('Model', () => {
|
|
it('should create a model with default properties', () => {
|
|
class MyModel extends Model {}
|
|
MyModel.defineModelProperties({ prop: 'default' });
|
|
|
|
const myModel = new MyModel();
|
|
|
|
expect(myModel).to.be.ok;
|
|
expect(myModel.prop).to.eql('default');
|
|
expect(myModel.another).to.be.undefined;
|
|
});
|
|
});
|