Skip to content

Commit f02e624

Browse files
committed
I've done the prep of this sprint 2
1 parent 95f7fd3 commit f02e624

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

prep/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
"scripts": {
55
"test": "jest"
66
},
7-
"name": "median.test.js",
7+
"name": "parse-query-string.test.js",
8+
"version": "1.0.0",
9+
"scripts": {
10+
"test": "jest"
11+
},
12+
"name": "median.test.js",
813
"version": "1.0.0",
914
"scripts": {
1015
"test": "jest"

prep/parse-query-string.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function parseQueryString() {
2+
return {};
3+
}

prep/parse-query-string.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
test("given a query string with multiple key-value pairs, returns them in object form", function () {
2+
const input = "sort=lowest&colour=yellow";
3+
const currentOutput = parseQueryString(input);
4+
const targetOutput = { sort: "lowest", colour: "yellow" };
5+
6+
expect(currentOutput).toEqual(targetOutput);
7+
});

0 commit comments

Comments
 (0)