From 0db5bcd627453cb243fa24737f979d21afa67edf Mon Sep 17 00:00:00 2001 From: hhzl Date: Thu, 8 Dec 2016 14:59:26 +0100 Subject: [PATCH 1/2] starting to fix #86 --- spec/learnwords2/LWdbSpec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/learnwords2/LWdbSpec.js b/spec/learnwords2/LWdbSpec.js index 2999419..94b8483 100644 --- a/spec/learnwords2/LWdbSpec.js +++ b/spec/learnwords2/LWdbSpec.js @@ -40,8 +40,7 @@ describe("Database LWdb", function() { expect(this.db).toBeObject(); expect(this.db).toHaveString("dbName"); - expect(this.db.dbName).toBeString("LearnWords"); - + expect(this.db.dbName).toBe("LearnWords"); expect(this.db).toHaveArray("_keysOfAllWords"); }); From 4c57eb7a740f2da921bd67302a1b35e856137a96 Mon Sep 17 00:00:00 2001 From: hhzl Date: Thu, 8 Dec 2016 16:44:33 +0100 Subject: [PATCH 2/2] fixes #86 --- spec/learnwords2/LWBoxOfQuestionsSpec.js | 4 ++-- spec/learnwords2/LWdbSpec.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/learnwords2/LWBoxOfQuestionsSpec.js b/spec/learnwords2/LWBoxOfQuestionsSpec.js index e1beb77..e0b575d 100644 --- a/spec/learnwords2/LWBoxOfQuestionsSpec.js +++ b/spec/learnwords2/LWBoxOfQuestionsSpec.js @@ -24,7 +24,7 @@ describe("BoxOfQuestions construction", function() { expect(LW).toBeObject(); - expect(LW.db.dbName).toBeString("learnWords"); + expect(LW.db.dbName).toBe("learnWords"); expect(LW.db.numberOfWords()).toBeNumber(10); }); @@ -55,7 +55,7 @@ describe("BoxOfQuestions construction", function() { expect(LW).toBeObject(); - expect(LW.db.dbName).toBeString("learnWords"); + expect(LW.db.dbName).toBe("learnWords"); expect(LW.db.numberOfWords()).toBeNumber(10); }); diff --git a/spec/learnwords2/LWdbSpec.js b/spec/learnwords2/LWdbSpec.js index 94b8483..efabd73 100644 --- a/spec/learnwords2/LWdbSpec.js +++ b/spec/learnwords2/LWdbSpec.js @@ -101,10 +101,10 @@ describe("Database LWdb", function() { expect(r._id).toBe(1); expect(r).toHaveString("word"); - expect(r.word).toBeString("melon"); + expect(r.word).toBe("melon"); expect(r).toHaveString("translate"); - expect(r.translate).toBeString("melon"); + expect(r.translate).toBe("die Melone"); expect(r).toHaveNumber("step"); expect(r.step).toBe(0); @@ -159,7 +159,7 @@ describe("Database LWdb", function() { expect(r.length).toBe(this.db.numberOfWords()); for(var i = 0; i < r.length; i++){ - expect(r[i]).toBeString("LearnWords-wd-"+(i+1)); + expect(r[i]).toBe("LearnWords-wd-"+(i+1)); } }); @@ -207,11 +207,11 @@ describe("Database LWdb", function() { expect(r[i]).toHaveString("word"); expect(tmp).toHaveString("word"); - expect(r[i].word).toBeString(tmp.word); + expect(r[i].word).toBe(tmp.word); expect(r[i]).toHaveString("translate"); expect(tmp).toHaveString("translate"); - expect(r[i].translate).toBeString(tmp.translate); + expect(r[i].translate).toBe(tmp.translate); expect(r[i]).toHaveNumber("_id"); expect(tmp).toHaveNumber("_id");