generated from atom-community/atom-ide-template
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmain-spec.js
42 lines (38 loc) · 1.14 KB
/
main-spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const timeout = process.env.CI ? 50000 : 1000
describe("tests", () => {
const deps = [
"atom-ide-markdown-service",
"atom-ide-datatip",
"atom-ide-signature-help",
"atom-ide-hyperclick",
"atom-ide-definitions",
"atom-ide-outline",
"atom-ide-code-format",
"linter",
"linter-ui-default",
"intentions",
]
beforeAll(async () => {
/* Activation */
// Trigger deferred activation
atom.packages.triggerDeferredActivationHooks()
// Activate activation hook
atom.packages.triggerActivationHook("core:loaded-shell-environment")
// Activate the package
await atom.packages.activatePackage("atom-ide-base")
// wait until package-deps installs the deps
await new Promise((resolve) => {
setTimeout(() => {
resolve()
}, timeout)
})
}, timeout + 1000)
it("Installation", function () {
const allPackages = atom.packages.getAvailablePackageNames()
deps.forEach(async (dep) => {
expect(allPackages.includes(dep)).toBeTruthy()
await atom.packages.activatePackage(dep)
expect(atom.packages.isPackageLoaded(dep)).toBeTruthy()
})
})
})