Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.

Commit 94a230a

Browse files
t-kellyt-kelly
t-kelly
authored andcommitted
Fix theme-cart tests
1 parent 7939ba6 commit 94a230a

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

packages/theme-cart/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"devDependencies": {
2626
"fetch-mock": "^7.0.0-alpha.6",
27+
"isomorphic-fetch": "^2.2.1",
2728
"rollup": "^0.66.0",
2829
"rollup-plugin-uglify": "^6.0.0",
2930
"size-limit": "^0.20.0"

packages/theme-cart/theme-cart.test.js

-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const fetchAPISettings = {
1818
const mockCartChange = function(url, options) {
1919
const body = JSON.parse(options.body);
2020
const line = body.line;
21-
console.log(populatedState.items);
2221
const item = populatedState.items[line - 1];
2322

2423
item.quantity = body.quantity || item.quantity;
@@ -368,7 +367,6 @@ describe('updateAttributes()', () => {
368367
describe('clearAttributes()', () => {
369368
beforeAll(() => {
370369
fetchMock.mock('/cart/update.js', (url, options) => {
371-
console.log(options.body);
372370
const body = JSON.parse(options.body);
373371
return Object.assign(populatedState, {
374372
attributes: body.attributes

yarn.lock

+26-2
Original file line numberDiff line numberDiff line change
@@ -2422,6 +2422,12 @@ encodeurl@~1.0.2:
24222422
version "1.0.2"
24232423
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
24242424

2425+
encoding@^0.1.11:
2426+
version "0.1.12"
2427+
resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb"
2428+
dependencies:
2429+
iconv-lite "~0.4.13"
2430+
24252431
end-of-stream@^1.0.0, end-of-stream@^1.1.0:
24262432
version "1.4.1"
24272433
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
@@ -3752,7 +3758,7 @@ [email protected]:
37523758
dependencies:
37533759
safer-buffer ">= 2.1.2 < 3"
37543760

3755-
iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4:
3761+
iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13:
37563762
version "0.4.24"
37573763
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
37583764
dependencies:
@@ -4117,7 +4123,7 @@ is-retry-allowed@^1.0.0:
41174123
version "1.1.0"
41184124
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
41194125

4120-
is-stream@^1.0.0, is-stream@^1.1.0:
4126+
is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
41214127
version "1.1.0"
41224128
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
41234129

@@ -4171,6 +4177,13 @@ isobject@^3.0.0, isobject@^3.0.1:
41714177
version "3.0.1"
41724178
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
41734179

4180+
isomorphic-fetch@^2.2.1:
4181+
version "2.2.1"
4182+
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
4183+
dependencies:
4184+
node-fetch "^1.0.1"
4185+
whatwg-fetch ">=0.10.0"
4186+
41744187
isstream@~0.1.2:
41754188
version "0.1.2"
41764189
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
@@ -5267,6 +5280,13 @@ [email protected]:
52675280
version "2.1.2"
52685281
resolved "http://registry.npmjs.org/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5"
52695282

5283+
node-fetch@^1.0.1:
5284+
version "1.7.3"
5285+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
5286+
dependencies:
5287+
encoding "^0.1.11"
5288+
is-stream "^1.0.1"
5289+
52705290
node-int64@^0.4.0:
52715291
version "0.4.0"
52725292
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
@@ -7466,6 +7486,10 @@ [email protected]:
74667486
version "2.0.4"
74677487
resolved "http://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"
74687488

7489+
whatwg-fetch@>=0.10.0:
7490+
version "3.0.0"
7491+
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb"
7492+
74697493
whatwg-mimetype@^2.1.0:
74707494
version "2.2.0"
74717495
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.2.0.tgz#a3d58ef10b76009b042d03e25591ece89b88d171"

0 commit comments

Comments
 (0)