Skip to content

Commit 0cdf890

Browse files
authored
add old version test
1 parent a2d1e17 commit 0cdf890

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

test/unit/test.natural_language_understanding.v1.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,22 @@ describe('natural_language_understanding', function() {
3737
});
3838
done();
3939
});
40+
41+
it('2016_01_23 version should work', function(done) {
42+
nock(watson.NaturalLanguageUnderstandingV1.URL)
43+
.post('/v1/analyze?version=' + watson.NaturalLanguageUnderstandingV1.VERSION_DATE_2016_01_23)
44+
.reply(200, {});
45+
46+
const options = {
47+
features: { concepts: {}, keywords: {} },
48+
text: 'hello, this is a test'
49+
};
50+
51+
nlu.analyze(options, done);
52+
});
4053

41-
it('2017_02_27 version should work', function(done) {
54+
it('analyze()', function(done) {
4255
nock(watson.NaturalLanguageUnderstandingV1.URL)
43-
.persist()
4456
.post('/v1/analyze?version=' + watson.NaturalLanguageUnderstandingV1.VERSION_DATE_2017_02_27)
4557
.reply(200, {});
4658

@@ -54,7 +66,6 @@ describe('natural_language_understanding', function() {
5466

5567
it('should list models', function(done) {
5668
nock(watson.NaturalLanguageUnderstandingV1.URL)
57-
.persist()
5869
.get('/v1/models?version=' + watson.NaturalLanguageUnderstandingV1.VERSION_DATE_2017_02_27)
5970
.reply(200, {});
6071

0 commit comments

Comments
 (0)