Skip to content

Commit cef9618

Browse files
add lint to test folder
1 parent 8bebb81 commit cef9618

13 files changed

Lines changed: 42 additions & 29 deletions

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"watch": "npm run build-version && babel src --out-dir lib --watch --source-maps --extensions '.ts,.js'",
1717
"clean": "rm -rf lib",
1818
"coverage": "jest --coverage --collectCoverageFrom=src/**/*.[jt]s",
19-
"lint": "eslint \"src/**/*.js\" \"src/**/*.ts\"",
19+
"lint": "eslint \"src/**/*.js\" \"src/**/*.ts\" \"test/**/*.ts\"",
2020
"lint-fix": "eslint \"src/**/*.js\" \"src/**/*.ts\" --fix",
2121
"jest": "jest",
2222
"test:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --watch",
@@ -77,6 +77,7 @@
7777
"@typescript-eslint/eslint-plugin": "^2.7.0",
7878
"@typescript-eslint/parser": "^2.6.1",
7979
"eslint": "^6.6.0",
80+
"eslint-plugin-jest": "^23.7.0",
8081
"husky": "^3.0.9",
8182
"jest": "^25.1.0",
8283
"jsdom": "^16.1.0",

test/.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"env": {
3+
"jest/globals": true
4+
},
5+
"plugins": [ "jest" ]
6+
}

test/unit/acl/access-controller.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
jest.mock('rdflib')
21
import * as RdfLib from 'rdflib'
3-
jest.mock('solid-auth-client')
42
import { JSDOM } from 'jsdom'
3+
jest.mock('rdflib')
4+
jest.mock('solid-auth-client')
55
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
66

77
import { AccessController } from '../../../src/acl/access-controller'

test/unit/acl/access-groups.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { AccessGroups } from '../../../src/acl/access-groups'
2+
13
jest.mock('rdflib')
24
jest.mock('solid-auth-client')
35

4-
import { AccessGroups } from '../../../src/acl/access-groups'
5-
66
describe('AccessGroups', () => {
77
it('exists', () => {
88
expect(AccessGroups).toBeInstanceOf(Function)

test/unit/acl/acl-control.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { JSDOM } from 'jsdom'
2+
13
jest.mock('rdflib')
24
jest.mock('solid-auth-client')
3-
import { JSDOM } from 'jsdom'
45
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
56

67
import {

test/unit/acl/acl.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { JSDOM } from 'jsdom'
2+
13
jest.mock('rdflib')
24
jest.mock('solid-auth-client')
3-
import { JSDOM } from 'jsdom'
45
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
56

67
import {

test/unit/acl/add-agent-buttons.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import { JSDOM } from 'jsdom'
2+
import { AddAgentButtons } from '../../../src/acl/add-agent-buttons'
3+
import { AccessGroups } from '../../../src/acl/access-groups'
4+
15
jest.mock('rdflib')
26
jest.mock('solid-auth-client')
3-
import { JSDOM } from 'jsdom'
47
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
58

6-
import { AddAgentButtons } from '../../../src/acl/add-agent-buttons'
7-
import { AccessGroups } from '../../../src/acl/access-groups'
89

910
function instantiateAddAgentButtons() {
1011
return new AddAgentButtons({

test/unit/acl/index.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
jest.mock('rdflib')
2-
jest.mock('solid-auth-client')
3-
import { JSDOM } from 'jsdom'
4-
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
5-
61
import * as Acl from '../../../src/acl/acl'
72
import * as AclControl from '../../../src/acl/acl-control'
83
import { acl, aclControl } from '../../../src/acl/index'
4+
import { JSDOM } from 'jsdom'
5+
6+
jest.mock('rdflib')
7+
jest.mock('solid-auth-client')
98

109
describe('acl/index:acl', () => {
1110
it('exports all of acl/acl', () => {

test/unit/acl/styles.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
jest.mock('rdflib')
2-
jest.mock('solid-auth-client')
3-
import { JSDOM } from 'jsdom'
4-
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
5-
61
import * as Styles from '../../../src/acl/styles'
72

3+
jest.mock('rdflib')
4+
jest.mock('solid-auth-client')
85

96
describe('Styles', () => {
107
it('exists', () => {

0 commit comments

Comments
 (0)