1 | const assert = require('assert'); |
||
2 | const ganache = require('ganache-cli'); |
||
3 | const Web3 = require('web3') |
||
4 | const web3 = new Web3(ganache.provider()); |
||
0 ignored issues
–
show
Unused Code
introduced
by
![]() |
|||
5 | class Car { |
||
6 | park() { |
||
7 | return 'Stopped'; |
||
8 | } |
||
9 | drive() { |
||
10 | return 'gogo'; |
||
11 | } |
||
12 | } |
||
13 | |||
14 | let car; |
||
15 | |||
16 | beforeEach(() => { |
||
17 | console.log(' before each test:'); |
||
0 ignored issues
–
show
|
|||
18 | car = new Car(); |
||
19 | }); |
||
20 | |||
21 | describe('Nguyen test Car class', () => { |
||
22 | it('can park', () => { |
||
23 | assert.equal(car.park(), 'Stopped'); |
||
24 | } ); |
||
25 | |||
26 | it('can drivde', () => { |
||
27 | assert.equal(car.drive(), 'gogo'); |
||
28 | } ); |
||
29 | } ) |
||
30 |