Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Commit

Permalink
Update "chai" version from 1.10 to 3.2.
Browse files Browse the repository at this point in the history
And fix some test for breaking changes of chai.
 [ chaijs/chai#371 ]
  • Loading branch information
laco0416 committed Jul 31, 2015
1 parent 4a848a1 commit dbcf473
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"devDependencies": {
"browserify": "^6.3.2",
"chai": "^1.10.0",
"chai": "^3.2.0",
"coveralls": "^2.11.2",
"event-stream": "^3.1.7",
"gulp": "^3.8.10",
Expand Down
32 changes: 16 additions & 16 deletions test/dict/CharacterDefinitionTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,43 +71,43 @@ describe("CharacterDefinition from char.def", function () {
});

it("SPACE class definition of INVOKE: false, GROUP: true, LENGTH: 0", function () {
expect(char_def.lookup(" ").is_always_invoke).to.be.false();
expect(char_def.lookup(" ").is_grouping).to.be.true();
expect(char_def.lookup(" ").is_always_invoke).to.be.false;
expect(char_def.lookup(" ").is_grouping).to.be.true;
expect(char_def.lookup(" ").max_length).to.be.equal(0);
});
it("KANJI class definition of INVOKE: false, GROUP: false, LENGTH: 2", function () {
expect(char_def.lookup("日").is_always_invoke).to.be.false();
expect(char_def.lookup("日").is_grouping).to.be.false();
expect(char_def.lookup("日").is_always_invoke).to.be.false;
expect(char_def.lookup("日").is_grouping).to.be.false;
expect(char_def.lookup("日").max_length).to.be.equal(2);
});
it("SYMBOL class definition of INVOKE: true, GROUP: true, LENGTH: 0", function () {
expect(char_def.lookup("!").is_always_invoke).to.be.true();
expect(char_def.lookup("!").is_grouping).to.be.true();
expect(char_def.lookup("!").is_always_invoke).to.be.true;
expect(char_def.lookup("!").is_grouping).to.be.true;
expect(char_def.lookup("!").max_length).to.be.equal(0);
});
it("NUMERIC class definition of INVOKE: true, GROUP: true, LENGTH: 0", function () {
expect(char_def.lookup("1").is_always_invoke).to.be.true();
expect(char_def.lookup("1").is_grouping).to.be.true();
expect(char_def.lookup("1").is_always_invoke).to.be.true;
expect(char_def.lookup("1").is_grouping).to.be.true;
expect(char_def.lookup("1").max_length).to.be.equal(0);
});
it("ALPHA class definition of INVOKE: true, GROUP: true, LENGTH: 0", function () {
expect(char_def.lookup("A").is_always_invoke).to.be.true();
expect(char_def.lookup("A").is_grouping).to.be.true();
expect(char_def.lookup("A").is_always_invoke).to.be.true;
expect(char_def.lookup("A").is_grouping).to.be.true;
expect(char_def.lookup("A").max_length).to.be.equal(0);
});
it("HIRAGANA class definition of INVOKE: false, GROUP: true, LENGTH: 2", function () {
expect(char_def.lookup("あ").is_always_invoke).to.be.false();
expect(char_def.lookup("あ").is_grouping).to.be.true();
expect(char_def.lookup("あ").is_always_invoke).to.be.false;
expect(char_def.lookup("あ").is_grouping).to.be.true;
expect(char_def.lookup("あ").max_length).to.be.equal(2);
});
it("KATAKANA class definition of INVOKE: true, GROUP: true, LENGTH: 2", function () {
expect(char_def.lookup("ア").is_always_invoke).to.be.true();
expect(char_def.lookup("ア").is_grouping).to.be.true();
expect(char_def.lookup("ア").is_always_invoke).to.be.true;
expect(char_def.lookup("ア").is_grouping).to.be.true;
expect(char_def.lookup("ア").max_length).to.be.equal(2);
});
it("KANJINUMERIC class definition of INVOKE: true, GROUP: true, LENGTH: 0", function () {
expect(char_def.lookup("一").is_always_invoke).to.be.true();
expect(char_def.lookup("一").is_grouping).to.be.true();
expect(char_def.lookup("一").is_always_invoke).to.be.true;
expect(char_def.lookup("一").is_grouping).to.be.true;
expect(char_def.lookup("一").max_length).to.be.equal(0);
});
it("Save and load", function () {
Expand Down
8 changes: 4 additions & 4 deletions test/util/DictionaryBuilderTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ describe("DictionaryBuilder", function () {
});

it("Dictionary not to be null", function () {
expect(kuromoji_dic).not.to.be.null();
expect(kuromoji_dic).not.to.be.null;
});
it("TokenInfoDictionary not to be null", function () {
expect(kuromoji_dic.token_info_dictionary).not.to.be.null();
expect(kuromoji_dic.token_info_dictionary).not.to.be.null;
});
it("TokenInfoDictionary", function () {
// expect(kuromoji_dic.token_info_dictionary.getFeatures("1467000")).to.have.length.above(1);
expect(kuromoji_dic.token_info_dictionary.dictionary.buffer).to.have.length.above(1);
});
it("DoubleArray not to be null", function () {
expect(kuromoji_dic.trie).not.to.be.null();
expect(kuromoji_dic.trie).not.to.be.null;
});
it("ConnectionCosts not to be null", function () {
expect(kuromoji_dic.connection_costs).not.to.be.null();
expect(kuromoji_dic.connection_costs).not.to.be.null;
});
it("Tokenize simple test", function () {
var tokenizer = new Tokenizer(kuromoji_dic);
Expand Down

0 comments on commit dbcf473

Please sign in to comment.