@server/next 0.28.4 → 0.28.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@server/next",
3
- "version": "0.28.4",
3
+ "version": "0.28.5",
4
4
  "description": "A fully-fledged web server with routing, file uploads, sessions, static files, schema validation, websockets, testing, etc.",
5
5
  "homepage": "https://server-js.com/",
6
6
  "repository": "https://github.com/franciscop/server-next.git",
@@ -17,7 +17,6 @@ const SELFCLOSE = new Set(
17
17
  );
18
18
 
19
19
  const REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
20
- const REACT_ELEMENT_TYPE = Symbol.for("react.element");
21
20
 
22
21
  const altAttrs = {
23
22
  classname: "class",
@@ -44,6 +44,25 @@ describe("jsx", () => {
44
44
  `<!DOCTYPE html><html lang="en">Hello</html>`,
45
45
  );
46
46
  });
47
+
48
+ it("can render a pre with text", () => {
49
+ expect(<pre>hello</pre>).toRender("<pre>hello</pre>");
50
+ });
51
+
52
+ it("can render a pre with newlines", () => {
53
+ expect(<pre>line1{"\n"}line2</pre>).toRender("<pre>line1\nline2</pre>");
54
+ });
55
+
56
+ it("can render a pre with indented text", () => {
57
+ expect(<pre>{` indented`}</pre>).toRender("<pre> indented</pre>");
58
+ });
59
+ it("can render a pre inside a div", () => {
60
+ expect(
61
+ <div>
62
+ <pre>line1{"\n"}line2</pre>
63
+ </div>,
64
+ ).toRender("<div><pre>line1\nline2</pre></div>");
65
+ });
47
66
  });
48
67
 
49
68
  describe("fragments", () => {