Skip to content

Commit

Permalink
test(core/biblio-db-spec): specref changed DOM spec
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Mar 7, 2017
1 parent 0ed7ac5 commit 16b0f67
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions tests/spec/core/biblio-db-spec.js
Expand Up @@ -18,6 +18,28 @@ describe("Core - biblioDB", () => {
"id": "ADD-ALL-TEST",
"title": "ADD ALL TEST",
},
"DAHU": {
"aliasOf": "DAHUT",
},
"DAHUT": {
"authors": [
"Robin Berjon"
],
"etAl": true,
"title": "The Dahut Specification Example From the Higher Circle",
"date": "15 March 1977",
"status": "Lazy Daft (Work for progress)",
"href": "http://berjon.com/",
"versions": [
"DAHUT-TEST6",
"DAHUT-TEST5",
"DAHUT-TEST4",
"DAHUT-TEST3",
"DAHUT-TEST2",
"DAHUT-TEST1"
],
"id": "DAHUT",
}
};
var biblioDB;
beforeAll((done) => {
Expand Down Expand Up @@ -216,10 +238,10 @@ describe("Core - biblioDB", () => {
biblioDB
.addAll(data)
.then(
() => biblioDB.find("WHATWG-DOM")
() => biblioDB.find("DAHU")
)
.then(
result => expect(result.id).toEqual("WHATWG-DOM")
result => expect(result.id).toEqual("DAHUT")
)
.then(
() => biblioDB.find("whatwg-dom") // alias
Expand All @@ -243,7 +265,7 @@ describe("Core - biblioDB", () => {
p3.catch(err => expect(err instanceof TypeError).toBe(true)),
]).then(done);
});
it("resolves known aliases or return null when alias is unknown", (done)=>{
it("resolves known aliases or return null when alias is unknown", (done) => {
biblioDB
.addAll(data)
.then(
Expand Down

0 comments on commit 16b0f67

Please sign in to comment.