Skip to content

Commit

Permalink
fix: Normalize paths for windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskerr committed Apr 13, 2020
1 parent cf0483a commit 9ecd933
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/js/brim/ingest.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/* @flow */
import ingest from "./ingest"
import path from "path"

test("one pcap", () => {
let data = ingest.getParams([{type: "pcap", path: "/work/my.pcap"}])

expect(data).toEqual({
dataDir: "/work/my.pcap.brim",
dataDir: path.join("/work", "my.pcap.brim"),
endpoint: "pcap",
paths: ["/work/my.pcap"]
})
Expand All @@ -15,7 +16,7 @@ test("one zeek log", () => {
let data = ingest.getParams([{type: "zeek", path: "/work/zeek.log"}])

expect(data).toEqual({
dataDir: "/work/zeek.log.brim",
dataDir: path.join("/work", "zeek.log.brim"),
endpoint: "zeek",
paths: ["/work/zeek.log"]
})
Expand All @@ -31,7 +32,7 @@ test("two zeek logs in same dir", () => {
)

expect(data).toEqual({
dataDir: "/home/.brim/work.brim",
dataDir: path.join("/home", ".brim", "work.brim"),
endpoint: "zeek",
paths: ["/work/zeek-1.log", "/work/zeek-2.log"]
})
Expand All @@ -48,7 +49,7 @@ test("two zeek logs in different dir", () => {
)

expect(data).toEqual({
dataDir: "/home/.brim/zeek_1969-12-31_16:00:00.brim",
dataDir: path.join("/home", ".brim", "zeek_1969-12-31_16:00:00.brim"),
endpoint: "zeek",
paths: ["/work/day-1/zeek.log", "/work/day-2/zeek.log"]
})
Expand Down

0 comments on commit 9ecd933

Please sign in to comment.