Skip to content

Commit

Permalink
split test
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus committed Aug 8, 2016
1 parent 09e68dc commit a3bfc96
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions packages/language/test/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,19 @@ describe('Document', function() {
Document.formatTokens_ = util.noop;
});

it('should return the language and syntax by default', function(done) {
it('should return the language by default', function(done) {
var apiResponse = apiResponses.default;
document.request = createRequestWithResponse(apiResponse);

document.annotate(function(err, annotation, apiResponse_) {
assert.ifError(err);
assert.strictEqual(annotation.language, apiResponse.language);
assert.deepEqual(apiResponse_, apiResponse);
done();
});
});

it('should return the syntax by default', function(done) {
var apiResponse = apiResponses.default;
document.request = createRequestWithResponse(apiResponse);

Expand All @@ -307,13 +319,9 @@ describe('Document', function() {

document.annotate(function(err, annotation, apiResponse_) {
assert.ifError(err);

assert.strictEqual(annotation.language, apiResponse.language);
assert.strictEqual(annotation.sentences, formattedSentences);
assert.strictEqual(annotation.tokens, formattedTokens);

assert.deepEqual(apiResponse_, apiResponse);

done();
});
});
Expand Down

0 comments on commit a3bfc96

Please sign in to comment.