Skip to content

Commit 9ea9afa

Browse files
committed
added es6 tests
1 parent 0be8d12 commit 9ea9afa

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

test/fixtures/file3.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict'
2+
3+
import os from 'os'
4+
5+
class CpuInfo {
6+
getCpuInfo () {
7+
return os.cpus()
8+
}
9+
}
10+
11+
export default CpuInfo

test/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ describe('inspekter-plugin-javascript', () => {
7575
})
7676

7777
it('should return one report object for each file', () => {
78-
const source = ['test/fixtures/file1.js', 'test/fixtures/file2.js']
78+
const source = ['test/fixtures/file1.js', 'test/fixtures/file2.js', 'test/fixtures/file3.js']
7979
const actual = ipj.analyze(source)
8080

8181
expect(actual).to.be.an('array')
82-
expect(actual).to.have.lengthOf(2)
82+
expect(actual).to.have.lengthOf(source.length)
8383
})
8484

8585
it('should return an object with all standard properties', () => {
@@ -92,9 +92,9 @@ describe('inspekter-plugin-javascript', () => {
9292
})
9393
})
9494

95-
describe('getExtension', () => {
95+
describe('extension', () => {
9696
it('should return js', () => {
97-
const actual = ipj.getExtension()
97+
const actual = ipj.extension
9898

9999
expect(actual).to.equal('js')
100100
})

0 commit comments

Comments
 (0)