Skip to content

Commit ec06524

Browse files
committed
Create application.class.test.js
1 parent cdc203c commit ec06524

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

test/lib/application.class.test.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import ThesisLighthouse from "../../src/lib/application.class.js";
2+
const Config = class {
3+
static urlList = [
4+
"https://emptywork.my.id", // my main website
5+
"https://js.emptywork.my.id", // my js playground website
6+
]
7+
8+
static appOptions = {
9+
"categories": ["accessibility", "seo"],
10+
"consoleLog": true
11+
}
12+
13+
static execOptions = {
14+
"maxBuffer": 2048 * 1024
15+
}
16+
}
17+
18+
const app = new ThesisLighthouse(Config)
19+
20+
test('urlList of Config', () => {
21+
expect(
22+
app.urlList
23+
).toStrictEqual(["https://emptywork.my.id", "https://js.emptywork.my.id"])
24+
})
25+
26+
test('appOptions of Config', () => {
27+
expect(
28+
app.options
29+
).toStrictEqual({
30+
"categories": ["accessibility", "seo"],
31+
"consoleLog": true
32+
})
33+
})
34+
35+
test('execOptions of Config', () => {
36+
expect(
37+
app.execOptions
38+
).toStrictEqual({
39+
"maxBuffer": 2048 * 1024
40+
})
41+
})

0 commit comments

Comments
 (0)