Skip to content

Commit

Permalink
update test name
Browse files Browse the repository at this point in the history
  • Loading branch information
jackiequach committed Jul 13, 2022
1 parent 37702e9 commit cb19d47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/util/__tests__/LinkUtils.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ describe("Generate back to serach url", () => {
describe("Extracts query parameter from url", () => {
test("extractQueryParam returns a single flag", () => {
mockRouter.setCurrentUrl(
"https://drb-qa.nypl.org/edition/1780467?feature=new_feature"
"https://drb-qa.nypl.org/edition/1780467?feature=true"
);
const features = extractQueryParam(mockRouter.query, "feature");
expect(features).toEqual("new_feature");
expect(features).toEqual("true");
});
test("extractQueryParam returns undefined if multiple flags", () => {
test("extractQueryParam returns undefined if multiple flags have the same name", () => {
mockRouter.setCurrentUrl(
"https://drb-qa.nypl.org/edition/1780467?feature=new_feature&feature=new_feature2"
"https://drb-qa.nypl.org/edition/1780467?feature=false&feature=true"
);
const features = extractQueryParam(mockRouter.query, "feature");
expect(features).toBeUndefined();
Expand Down

0 comments on commit cb19d47

Please sign in to comment.