Skip to content

Commit

Permalink
tweak: refactoring unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
fduplessisduplessis committed Jul 5, 2017
1 parent ec3217d commit 9ee0709
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions test/issues/pull.ts → test/issues/#82.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ interface TestDocument {


@Iridium.Collection("test")
@Iridium.Transform(doc => {
if (doc.metadata && typeof doc.metadata === "string")
doc.metadata = JSON.parse(doc.metadata);
return doc;
}, doc => {
if (doc.metadata && typeof doc.metadata === "object")
doc.metadata = JSON.stringify(doc.metadata);
return doc
})
class Test extends Iridium.Instance<TestDocument, Test> implements TestDocument {
@Iridium.ObjectID
_id: string;
Expand Down Expand Up @@ -63,7 +54,7 @@ describe("issues", () => {
before(() => core.connect());
after(() => core.close());

describe("pull", () => {
describe("#82", () => {
let model = new Iridium.Model<TestDocument, Test>(core, Test);

it("save should not throw $pull is empty", () => {
Expand Down Expand Up @@ -94,7 +85,6 @@ describe("issues", () => {
]
}
}
console.log("test ran");
return test.save();
});
});
Expand Down

0 comments on commit 9ee0709

Please sign in to comment.