@khanacademy/wonder-blocks-grid 1.0.33 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/package.json +3 -3
- package/src/components/__tests__/row.test.js +16 -20
- package/dist/index.js +0 -1402
- package/dist/index.js.flow +0 -2
- package/src/__tests__/__snapshots__/generated-snapshot.test.js.snap +0 -2247
- package/src/__tests__/generated-snapshot.test.js +0 -559
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-grid
|
|
2
2
|
|
|
3
|
+
## 1.0.35
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [b561425a]
|
|
8
|
+
- Updated dependencies [a566e232]
|
|
9
|
+
- Updated dependencies [d2b21a6e]
|
|
10
|
+
- @khanacademy/wonder-blocks-core@4.6.0
|
|
11
|
+
|
|
12
|
+
## 1.0.34
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [175a2dd2]
|
|
17
|
+
- @khanacademy/wonder-blocks-core@4.5.0
|
|
18
|
+
|
|
3
19
|
## 1.0.33
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-grid",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime": "^7.18.6",
|
|
19
19
|
"@khanacademy/wonder-blocks-color": "^1.2.0",
|
|
20
|
-
"@khanacademy/wonder-blocks-core": "^4.
|
|
20
|
+
"@khanacademy/wonder-blocks-core": "^4.6.0",
|
|
21
21
|
"@khanacademy/wonder-blocks-spacing": "^3.0.5"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"react": "16.14.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"wb-dev-build-settings": "^0.
|
|
28
|
+
"wb-dev-build-settings": "^0.5.0"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import {
|
|
5
|
-
import "jest-enzyme";
|
|
4
|
+
import {render} from "@testing-library/react";
|
|
6
5
|
|
|
7
6
|
import {
|
|
8
7
|
MEDIA_DEFAULT_SPEC,
|
|
@@ -17,7 +16,7 @@ describe("Row", () => {
|
|
|
17
16
|
// Arrange
|
|
18
17
|
|
|
19
18
|
// Act
|
|
20
|
-
const
|
|
19
|
+
const {container} = render(
|
|
21
20
|
<div>
|
|
22
21
|
<MediaLayoutContext.Provider
|
|
23
22
|
value={{
|
|
@@ -35,16 +34,15 @@ describe("Row", () => {
|
|
|
35
34
|
</MediaLayoutContext.Provider>
|
|
36
35
|
</div>,
|
|
37
36
|
);
|
|
38
|
-
const text = wrapper.text();
|
|
39
37
|
|
|
40
38
|
// Assert
|
|
41
|
-
expect(
|
|
39
|
+
expect(container).toHaveTextContent("colslargeCols");
|
|
42
40
|
});
|
|
43
41
|
|
|
44
42
|
it("should throw if there are too many columns", async () => {
|
|
45
43
|
// Arrange
|
|
46
|
-
const
|
|
47
|
-
|
|
44
|
+
const underTest = () => {
|
|
45
|
+
render(
|
|
48
46
|
<div>
|
|
49
47
|
<MediaLayoutContext.Provider
|
|
50
48
|
value={{
|
|
@@ -62,7 +60,7 @@ describe("Row", () => {
|
|
|
62
60
|
};
|
|
63
61
|
|
|
64
62
|
// Act, Assert
|
|
65
|
-
expect(
|
|
63
|
+
expect(underTest).toThrow();
|
|
66
64
|
});
|
|
67
65
|
});
|
|
68
66
|
|
|
@@ -71,7 +69,7 @@ describe("Row", () => {
|
|
|
71
69
|
// Arrange
|
|
72
70
|
|
|
73
71
|
// Act
|
|
74
|
-
const
|
|
72
|
+
const {container} = render(
|
|
75
73
|
<div>
|
|
76
74
|
<MediaLayoutContext.Provider
|
|
77
75
|
value={{
|
|
@@ -89,16 +87,15 @@ describe("Row", () => {
|
|
|
89
87
|
</MediaLayoutContext.Provider>
|
|
90
88
|
</div>,
|
|
91
89
|
);
|
|
92
|
-
const text = wrapper.text();
|
|
93
90
|
|
|
94
91
|
// Assert
|
|
95
|
-
expect(
|
|
92
|
+
expect(container).toHaveTextContent("colsmediumCols");
|
|
96
93
|
});
|
|
97
94
|
|
|
98
95
|
it("should throw if there are too many columns", () => {
|
|
99
96
|
// Arrange
|
|
100
|
-
const
|
|
101
|
-
|
|
97
|
+
const underTest = () => {
|
|
98
|
+
render(
|
|
102
99
|
<div>
|
|
103
100
|
<MediaLayoutContext.Provider
|
|
104
101
|
value={{
|
|
@@ -116,7 +113,7 @@ describe("Row", () => {
|
|
|
116
113
|
};
|
|
117
114
|
|
|
118
115
|
// Act, Assert
|
|
119
|
-
expect(
|
|
116
|
+
expect(underTest).toThrow();
|
|
120
117
|
});
|
|
121
118
|
});
|
|
122
119
|
|
|
@@ -125,7 +122,7 @@ describe("Row", () => {
|
|
|
125
122
|
// Arrange
|
|
126
123
|
|
|
127
124
|
// Act
|
|
128
|
-
const
|
|
125
|
+
const {container} = render(
|
|
129
126
|
<div>
|
|
130
127
|
<MediaLayoutContext.Provider
|
|
131
128
|
value={{
|
|
@@ -143,16 +140,15 @@ describe("Row", () => {
|
|
|
143
140
|
</MediaLayoutContext.Provider>
|
|
144
141
|
</div>,
|
|
145
142
|
);
|
|
146
|
-
const text = wrapper.text();
|
|
147
143
|
|
|
148
144
|
// Assert
|
|
149
|
-
expect(
|
|
145
|
+
expect(container).toHaveTextContent("colssmallCols");
|
|
150
146
|
});
|
|
151
147
|
|
|
152
148
|
it("should throw if there are too many columns", () => {
|
|
153
149
|
// Arrange
|
|
154
|
-
const
|
|
155
|
-
|
|
150
|
+
const underTest = () => {
|
|
151
|
+
render(
|
|
156
152
|
<div>
|
|
157
153
|
<MediaLayoutContext.Provider
|
|
158
154
|
value={{
|
|
@@ -170,7 +166,7 @@ describe("Row", () => {
|
|
|
170
166
|
};
|
|
171
167
|
|
|
172
168
|
// Act, Assert
|
|
173
|
-
expect(
|
|
169
|
+
expect(underTest).toThrow();
|
|
174
170
|
});
|
|
175
171
|
});
|
|
176
172
|
});
|