now allows adding a saveable decorator

This commit is contained in:
2016-11-18 00:42:25 +01:00
parent 9cbdf317dc
commit e49811eecd
6 changed files with 109 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -72,6 +72,7 @@ describe('smartdata', function () {
it('should create an extended class', function () {
@smartdata.Collection(testDb)
class TestCar extends smartdata.DbDoc<TestCar> {
@smartdata.saveable
color: string
constructor(optionsArg: {
color: string,
@ -85,6 +86,8 @@ describe('smartdata', function () {
color: 'red',
property2: 2
})
should(testCarInstance.saveableProperties[0]).equal('color')
console.log(TestCar)
should(testCarInstance.collection).be.instanceof(smartdata.DbCollection)
should(testCarInstance).be.instanceof(smartdata.DbDoc)