-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
42 lines (30 loc) · 1.01 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
import assert from 'assert';
import requester_states from './src/plugins/data-requester-states';
import requester_cities from './src/plugins/data-requester-cities';
import requester_stations from './src/plugins/data-requester-stations';
describe('test', () => {
it('Returns states and fuels', () => {
return requester_states().then(function(json){
console.log(json)
}).catch(function(ex) {
console.error(ex);
throw ex;
});
})
it('Returns cities', () => {
return requester_cities('931*De 16/04/2017 a 22/04/2017', 'AC*ACRE', '487*Gasolina').then(function(json){
console.log(json)
}).catch(function(ex) {
console.error(ex);
throw ex;
});
})
it('Returns stations', () => {
return requester_stations('931', '6*CRUZEIRO@DO@SUL', '487').then(function(json){
console.log(json)
})
.catch(function(ex) {
console.error(ex);
});
})
})