-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirefox.test.js
More file actions
27 lines (21 loc) · 876 Bytes
/
firefox.test.js
File metadata and controls
27 lines (21 loc) · 876 Bytes
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
//write test for firefox.js
const getFirefoxProfiles = require("./firefox.js").getFirefoxProfiles;
test("getFirefoxProfiles", async () => {
const profiles = await getFirefoxProfiles();
expect(profiles).toEqual([
"C:\\Users\\Puneet-Pc\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\2pn3v74b.default-release",
]);
});
const getFirefoxSessions = require("./firefox.js").getFirefoxSessions;
test("getFirefoxSessions", async () => {
const profiles = await getFirefoxProfiles();
const sessions = await getFirefoxSessions(profiles);
expect(sessions);
});
const parseFirefoxSession = require("./firefox.js").parseFirefoxSession;
test("parseFirefoxSession", async () => {
const profiles = await getFirefoxProfiles();
const sessions = await getFirefoxSessions(profiles);
const parsedSessions = parseFirefoxSession(sessions[0]);
expect(parsedSessions);
});