-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
69 lines (55 loc) · 1.74 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
var chai = require('chai'),
expect = chai.expect,
fs = require('fs'),
path = require('path')
//that works, it was just missing the callback
//need to get directoy structure
describe('Output', function() {
it('The sentiment score has to be at least zero', function(done){
return new Promise((resolve, reject) => {
setTimeout(() => expect(global.finalOutputTest.to.be.at.least(0)), 2000)
done();
})})
});
describe('Output', function() {
it('The sentiment score has to be a number', function(done){
return new Promise((resolve, reject) => {
setTimeout(() => expect(finalOutput.to.be.a('Number')), 2000)
done();
})})
});
describe('Output', function() {
it('sentiment score should always exist', function(done){
return new Promise((resolve, reject) => {
setTimeout(() => expect(finalOutput.to.exist), 2000)
done();
})})
});
describe('Output', function() {
it('The output csv should always exist', function(done){
return new Promise((resolve, reject) => {
setTimeout(() => expect(fs.stat(path.join(__dirname,'\output\\sentiment.csv')).to.equal(true)), 2000)
done();
})})
});
describe('Input', function() {
it('stopWords should not be empty', function(done){
return new Promise((resolve, reject) => {
setTimeout(() => expect(stopWords.to.have.lengthOf.above(0)), 2000)
done();
})})
});
describe('Input', function() {
it('positiveWords should not be empty', function(done){
return new Promise((resolve, reject) => {
setTimeout(() => expect(positiveWords.to.have.lengthOf.above(0)), 2000)
done();
})})
});
describe('Input', function() {
it('negativeWords should not be empty', function(done){
return new Promise((resolve, reject) => {
setTimeout(() => expect(negativeWords.to.have.lengthOf.above(0)), 2000)
done();
})})
});