Skip to content

Commit 39a447e

Browse files
authored
Merge pull request #87 from hhzl/fixExpectToBeString
Fix expect to be string
2 parents 6e68b1e + 4c57eb7 commit 39a447e

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

spec/learnwords2/LWBoxOfQuestionsSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe("BoxOfQuestions construction", function() {
2424

2525
expect(LW).toBeObject();
2626

27-
expect(LW.db.dbName).toBeString("learnWords");
27+
expect(LW.db.dbName).toBe("learnWords");
2828
expect(LW.db.numberOfWords()).toBeNumber(10);
2929

3030
});
@@ -55,7 +55,7 @@ describe("BoxOfQuestions construction", function() {
5555

5656
expect(LW).toBeObject();
5757

58-
expect(LW.db.dbName).toBeString("learnWords");
58+
expect(LW.db.dbName).toBe("learnWords");
5959
expect(LW.db.numberOfWords()).toBeNumber(10);
6060

6161
});

spec/learnwords2/LWdbSpec.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ describe("Database LWdb", function() {
4040
expect(this.db).toBeObject();
4141

4242
expect(this.db).toHaveString("dbName");
43-
expect(this.db.dbName).toBeString("LearnWords");
44-
43+
expect(this.db.dbName).toBe("LearnWords");
4544
expect(this.db).toHaveArray("_keysOfAllWords");
4645

4746
});
@@ -102,10 +101,10 @@ describe("Database LWdb", function() {
102101
expect(r._id).toBe(1);
103102

104103
expect(r).toHaveString("word");
105-
expect(r.word).toBeString("melon");
104+
expect(r.word).toBe("melon");
106105

107106
expect(r).toHaveString("translate");
108-
expect(r.translate).toBeString("melon");
107+
expect(r.translate).toBe("die Melone");
109108

110109
expect(r).toHaveNumber("step");
111110
expect(r.step).toBe(0);
@@ -160,7 +159,7 @@ describe("Database LWdb", function() {
160159
expect(r.length).toBe(this.db.numberOfWords());
161160

162161
for(var i = 0; i < r.length; i++){
163-
expect(r[i]).toBeString("LearnWords-wd-"+(i+1));
162+
expect(r[i]).toBe("LearnWords-wd-"+(i+1));
164163
}
165164

166165
});
@@ -208,11 +207,11 @@ describe("Database LWdb", function() {
208207

209208
expect(r[i]).toHaveString("word");
210209
expect(tmp).toHaveString("word");
211-
expect(r[i].word).toBeString(tmp.word);
210+
expect(r[i].word).toBe(tmp.word);
212211

213212
expect(r[i]).toHaveString("translate");
214213
expect(tmp).toHaveString("translate");
215-
expect(r[i].translate).toBeString(tmp.translate);
214+
expect(r[i].translate).toBe(tmp.translate);
216215

217216
expect(r[i]).toHaveNumber("_id");
218217
expect(tmp).toHaveNumber("_id");

0 commit comments

Comments
 (0)