File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,14 @@ import remarkEmbedder from '@remark-embedder/core'
2
2
import remark from 'remark'
3
3
import html from 'remark-html'
4
4
5
- import CodeSandboxTransformer from '..'
5
+ import CodeSandboxTransformer from '../'
6
+
7
+ // this removes the quotes around strings...
8
+ const unquoteSerializer = {
9
+ serialize : ( val : string ) => val . trim ( ) ,
10
+ test : ( val : unknown ) => typeof val === 'string' ,
11
+ }
12
+ expect . addSnapshotSerializer ( unquoteSerializer )
6
13
7
14
test ( 'smoke test' , async ( ) => {
8
15
const result = await remark ( )
@@ -19,12 +26,7 @@ https://codesandbox.io/s/css-variables-vs-themeprovider-df90h
19
26
)
20
27
21
28
expect ( result . toString ( ) ) . toMatchInlineSnapshot ( `
22
- "<p>This is a CodeSandbox:</p>
23
- <iframe src=\\"https://codesandbox.io/embed/css-variables-vs-themeprovider-df90h\\" style=\\"width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;\\" allow=\\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\\" sandbox=\\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\\"></iframe>
24
- "
29
+ <p>This is a CodeSandbox:</p>
30
+ <iframe src="https://codesandbox.io/embed/css-variables-vs-themeprovider-df90h" style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;" allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"></iframe>
25
31
` )
26
32
} )
27
-
28
- /*
29
- eslint @typescript-eslint/no-unsafe-assignment: "off"
30
- */
You can’t perform that action at this time.
0 commit comments