Skip to content

Commit

Permalink
test(document): repro #8237
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Oct 20, 2019
1 parent e5f8875 commit 9b986f5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/document.test.js
Expand Up @@ -130,6 +130,15 @@ describe('document', function() {
db.close(done);
});

describe('constructor', function() {
it('supports passing in schema directly (gh-8237)', function() {
const myUserDoc = new Document({}, { name: String });
assert.ok(!myUserDoc.name);
myUserDoc.name = 123;
assert.strictEqual(myUserDoc.name, '123');
});
});

describe('delete', function() {
it('deletes the document', function() {
const schema = new Schema({ x: String });
Expand Down

0 comments on commit 9b986f5

Please sign in to comment.