Skip to content

Commit 6dda885

Browse files
committed
feat: add another test for getOptions
1 parent 02b6df4 commit 6dda885

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/util.test.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,18 @@ describe("util", () => {
163163
})
164164
})
165165

166-
it.skip("should include queryOpts", () => {
166+
it("should include queryOpts", () => {
167+
// Trying to understand how the implementation works
168+
// 1. It grabs the search params from location.search (i.e. ?)
169+
// 2. it then grabs the "options" param if it exists
170+
// 3. then it creates a new options object
171+
// spreads the original options
172+
// then parses the queryOpts
173+
location.search = '?options={"logLevel":2}'
167174
expect(getOptions()).toStrictEqual({
168175
base: "",
176+
csStaticBase: "",
177+
logLevel: 2,
169178
})
170179
})
171180
})

0 commit comments

Comments
 (0)