2023-05-20 21:57:36 +02:00

2.8 KiB

Snapshot report for test/basic/test.js

The actual snapshot is saved in test.js.snap.

Generated by AVA.

simple

Snapshot 1

[
  {
    code: `const b = ()=>'batman';␊
    console.log(b());␊
    ␊
    export { b };␊
    //# sourceMappingURL=batman-c7fa228c.js.map␊
    `,
    fileName: 'batman-c7fa228c.js',
    map: SourceMap {
      file: 'batman-c7fa228c.js',
      mappings: 'AAAY,MAAC,CAAC,GAAG,IAAI,SAAS;AAC9B,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;;;;',
      names: [],
      sources: [
        '../batman.js',
      ],
      sourcesContent: [
        `export const b = ()=>'batman';␊
        console.log(b());␊
        `,
      ],
      version: 3,
    },
    source: undefined,
  },
  {
    code: undefined,
    fileName: 'batman-c7fa228c.js.map',
    map: undefined,
    source: '{"version":3,"file":"batman-c7fa228c.js","sources":["../batman.js"],"sourcesContent":["export const b = ()=>\'batman\';\\nconsole.log(b());\\n"],"names":[],"mappings":"AAAY,MAAC,CAAC,GAAG,IAAI,SAAS;AAC9B,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;;;;"}',
  },
  {
    code: undefined,
    fileName: 'index.html',
    map: undefined,
    source: `<html><head>␊
        </head>␊
        <body>␊
            <script src="batman-c7fa228c.js" type="module"></script>␊
        ␊
    ␊
    </body></html>`,
  },
]

inline-script

Snapshot 1

[
  {
    code: undefined,
    fileName: 'script.html',
    map: undefined,
    source: `<html><head>␊
        </head>␊
        <body>␊
            <script type="module">const b = ()=>'batman';␊
    console.log(b());␊
    ␊
    document.body.appendChild(␊
                    document.createTextNode(\`Inline script including ${b()}\`)␊
                );␊
    //# sourceMappingURL=script.html.body.script.js-e3b82208.js.map␊
    </script>␊
        ␊
    ␊
    </body></html>`,
  },
  {
    code: undefined,
    fileName: 'script.html.body.script.js-e3b82208.js.map',
    map: undefined,
    source: '{"version":3,"file":"script.html.body.script.js-e3b82208.js","sources":["../batman.js","../script.html.body.script.js"],"sourcesContent":["export const b = ()=>\'batman\';\\nconsole.log(b());\\n","\\n            import {b} from \\"./batman.js\\";\\n            document.body.appendChild(\\n                document.createTextNode(`Inline script including ${b()}`)\\n            );\\n        "],"names":[],"mappings":"AAAO,MAAM,CAAC,GAAG,IAAI,QAAQ,CAAC;AAC9B,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;;ACCJ,QAAQ,CAAC,IAAI,CAAC,WAAW;AACrC,gBAAgB,QAAQ,CAAC,cAAc,CAAC,CAAC,wBAAwB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACzE,aAAa"}',
  },
]