Skip to content

Commit 24c5255

Browse files
lint --fix
1 parent cef9618 commit 24c5255

37 files changed

Lines changed: 170 additions & 179 deletions

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

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

74
import { AccessController } from '../../../src/acl/access-controller'
85
import { DataBrowserContext } from 'pane-registry'
6+
jest.mock('rdflib')
7+
jest.mock('solid-auth-client')
8+
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
99

10-
function instantiateAccessController() {
10+
function instantiateAccessController () {
1111
const subject = RdfLib.sym('')
1212
const noun = ''
1313
const context = {} as DataBrowserContext
@@ -70,7 +70,6 @@ describe('AccessController#renderTemporaryStatus', () => {
7070
})
7171
})
7272

73-
7473
describe('AccessController#renderStatus', () => {
7574
it('exists', () => {
7675
expect(instantiateAccessController().renderStatus).toBeInstanceOf(Function)
@@ -80,7 +79,6 @@ describe('AccessController#renderStatus', () => {
8079
})
8180
})
8281

83-
8482
describe('AccessController#save', () => {
8583
it('exists', () => {
8684
expect(instantiateAccessController().save).toBeInstanceOf(Function)
@@ -89,4 +87,3 @@ describe('AccessController#save', () => {
8987
expect(instantiateAccessController().save()).resolves.toEqual(undefined)
9088
})
9189
})
92-

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ describe('AccessGroups', () => {
77
it('exists', () => {
88
expect(AccessGroups).toBeInstanceOf(Function)
99
})
10-
})
10+
})

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { JSDOM } from 'jsdom'
22

3-
jest.mock('rdflib')
4-
jest.mock('solid-auth-client')
5-
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
6-
73
import {
84
ACLControlBox5,
95
preventBrowserDropEvents,
106
shortNameForFolder
117
} from '../../../src/acl/acl-control'
128

9+
jest.mock('rdflib')
10+
jest.mock('solid-auth-client')
11+
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
12+
1313
describe('ACLControlBox5', () => {
1414
it('exists', () => {
1515
expect(ACLControlBox5).toBeInstanceOf(Function)
@@ -26,4 +26,4 @@ describe('shortNameForFolder', () => {
2626
it('exists', () => {
2727
expect(shortNameForFolder).toBeInstanceOf(Function)
2828
})
29-
})
29+
})

test/unit/acl/acl.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { JSDOM } from 'jsdom'
22

3-
jest.mock('rdflib')
4-
jest.mock('solid-auth-client')
5-
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
6-
73
import {
84
ACLbyCombination,
95
ACLToString,
@@ -26,6 +22,10 @@ import {
2622
setACL
2723
} from '../../../src/acl/acl'
2824

25+
jest.mock('rdflib')
26+
jest.mock('solid-auth-client')
27+
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
28+
2929
describe('ACLbyCombination', () => {
3030
it('exists', () => {
3131
expect(ACLbyCombination).toBeInstanceOf(Function)

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ jest.mock('rdflib')
66
jest.mock('solid-auth-client')
77
const dom = new JSDOM('<!DOCTYPE html><p>Hello world</p>').window.document
88

9-
10-
function instantiateAddAgentButtons() {
9+
function instantiateAddAgentButtons () {
1110
return new AddAgentButtons({
1211
controller: {
1312
dom
@@ -28,4 +27,4 @@ describe('AddAgentButtons#render', () => {
2827
it('exists', () => {
2928
expect(instantiateAddAgentButtons().render).toBeInstanceOf(Function)
3029
})
31-
})
30+
})

test/unit/acl/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ jest.mock('solid-auth-client')
88

99
describe('acl/index:acl', () => {
1010
it('exports all of acl/acl', () => {
11-
for (let k in Acl) {
11+
for (const k in Acl) {
1212
if (k !== 'getProspectiveHolder') {
1313
expect(acl[k]).toEqual(Acl[k])
1414
}
1515
}
1616
})
1717
it('exports all of acl/acl-control', () => {
18-
for (let k in AclControl) {
18+
for (const k in AclControl) {
1919
expect(aclControl[k]).toEqual(AclControl[k])
2020
}
2121
})
22-
})
22+
})

test/unit/acl/styles.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ describe('Styles', () => {
77
it('exists', () => {
88
expect(typeof Styles).toEqual('object')
99
})
10-
})
10+
})

test/unit/authn/authn.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import * as RdfLib from 'rdflib'
22

3-
jest.mock('rdflib')
4-
jest.mock('solid-auth-client')
5-
63
import {
74
checkUser, // Async
85
currentUser, // Sync
@@ -27,6 +24,9 @@ import {
2724
solidAuthClient
2825
} from '../../../src/authn/authn'
2926

27+
jest.mock('rdflib')
28+
jest.mock('solid-auth-client')
29+
3030
describe('checkUser', () => {
3131
it('exists', () => {
3232
expect(checkUser).toBeInstanceOf(Function)
@@ -70,7 +70,6 @@ describe('findAppInstances', () => {
7070
it('runs', async () => {
7171
expect(await findAppInstances({}, RdfLib.sym(''), false)).toBeInstanceOf(Object)
7272
})
73-
7473
})
7574

7675
describe('findOriginOwner', () => {

test/unit/authn/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ jest.mock('solid-auth-client')
55

66
describe('authn/index', () => {
77
it('exports all of authn/authn', () => {
8-
for (let k in Authn) {
8+
for (const k in Authn) {
99
if (k !== 'default') {
1010
expect(Index[k]).toEqual(Authn[k])
1111
}
1212
}
1313
})
14-
})
14+
})

test/unit/chat/bookmarks.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ describe('findBookmarkDocument', () => {
1717
}
1818
window.alert = () => {}
1919

20-
const result = await findBookmarkDocument(context);
20+
const result = await findBookmarkDocument(context)
2121
expect(result).toEqual({
2222
containers: [],
2323
index: {
24-
public: [],
24+
public: []
2525
},
26-
instances: [],
26+
instances: []
2727
})
2828
})
2929
})
@@ -41,9 +41,9 @@ describe('toggleBookmark', () => {
4141
const bookmarkButton = {}
4242
try {
4343
const result = await toggleBookmark(userContext, target, bookmarkButton)
44-
} catch(e) {
44+
} catch (e) {
4545
expect(e.message).toEqual('Must be logged on to add Bookmark')
46-
}
46+
}
4747
})
4848
})
4949

@@ -58,6 +58,6 @@ describe('renderBookmarksButton', () => {
5858
}
5959
const target = {}
6060
const result = await renderBookmarksButton(userContext, target)
61-
expect(typeof result).toEqual('object')
61+
expect(typeof result).toEqual('object')
6262
})
63-
})
63+
})

0 commit comments

Comments
 (0)