Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Sep 23, 2019
1 parent b926f26 commit 824fd14
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tests/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,15 @@ describe('api of homunculus', function() {
expect(homunculus.getClass('lexer', 'es6')).to.be(EcmascriptLexer);
expect(homunculus.getClass('lexer', 'as')).to.be(EcmascriptLexer);
expect(homunculus.getClass('lexer', 'actionscript')).to.be(EcmascriptLexer);

expect(homunculus.getClass('lexer', 'css')).to.be(CssLexer);

expect(function() {
homunculus.getClass('lexer', 'unknow');
}).to.throwError();
expect(homunculus.getClass('lexer')).to.be(Lexer);

expect(homunculus.getClass('parser', 'js')).to.be(JsParser);
expect(homunculus.getClass('parser', 'javascript')).to.be(JsParser);
expect(homunculus.getClass('parser', 'es')).to.be(JsParser);
expect(homunculus.getClass('parser', 'es5')).to.be(JsParser);
expect(homunculus.getClass('parser', 'ecmascript')).to.be(JsParser);
expect(homunculus.getClass('parser', 'es6')).to.be(Es6Parser);

expect(homunculus.getClass('parser', 'css')).to.be(CssParser);

expect(function() {
Expand All @@ -53,7 +48,6 @@ describe('api of homunculus', function() {
expect(homunculus.getClass('node', 'es5')).to.be(JsNode);
expect(homunculus.getClass('node', 'ecmascript')).to.be(JsNode);
expect(homunculus.getClass('node', 'es6')).to.be(Es6Node);

expect(homunculus.getClass('node', 'css')).to.be(CssNode);

expect(function() {
Expand Down Expand Up @@ -88,7 +82,6 @@ describe('api of homunculus', function() {
expect(homunculus.getLexer('es6')).to.be.a(Lexer);
expect(homunculus.getLexer('as')).to.be.a(Lexer);
expect(homunculus.getLexer('actionscript')).to.be.a(Lexer);

expect(homunculus.getLexer('css')).to.be.a(CssLexer);

expect(function() {
Expand All @@ -102,7 +95,6 @@ describe('api of homunculus', function() {
expect(homunculus.getParser('es5')).to.be.a(JsParser);
expect(homunculus.getParser('ecmascript')).to.be.a(JsParser);
expect(homunculus.getParser('es6')).to.be.a(Es6Parser);

expect(homunculus.getParser('css')).to.be.a(CssParser);

expect(function() {
Expand All @@ -123,4 +115,4 @@ describe('api of homunculus', function() {
it('#reset', function() {
expect(homunculus.reset).to.be.a(Function);
});
});
});

0 comments on commit 824fd14

Please sign in to comment.