109 lines
3.4 KiB
Plaintext
109 lines
3.4 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`basic inline-script 1`] = `
|
|
###############
|
|
# script.html #
|
|
###############
|
|
<html><head>
|
|
<!-- TODO:
|
|
EMPTY FAVICON, PREVENTS THE EXTRA REQUEST, but should be ignored by the rollup plugin:
|
|
<link rel="icon" href="data:,">
|
|
ONCE ADDED: change the snapshot to include full output (of browser test + code, instead of just .code)
|
|
-->
|
|
</head>
|
|
<body>
|
|
<script type="module">const b = ()=>'batman';
|
|
console.log(b());
|
|
|
|
document.body.appendChild(
|
|
document.createTextNode(\`Inline script including \${b()}\`)
|
|
);
|
|
//# sourceMappingURL=script.body.script.js.js.map
|
|
</script>
|
|
|
|
|
|
</body></html>
|
|
################################
|
|
# script.body.script.js.js.map #
|
|
################################
|
|
{"version":3,"file":"script.body.script.js.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"}
|
|
#################
|
|
# RENDERED HTML #
|
|
#################
|
|
<html><head>
|
|
<!-- TODO:
|
|
EMPTY FAVICON, PREVENTS THE EXTRA REQUEST, but should be ignored by the rollup plugin:
|
|
<link rel="icon" href="data:,">
|
|
ONCE ADDED: change the snapshot to include full output (of browser test + code, instead of just .code)
|
|
-->
|
|
</head>
|
|
<body>
|
|
<script type="module">const b = ()=>'batman';
|
|
console.log(b());
|
|
|
|
document.body.appendChild(
|
|
document.createTextNode(\`Inline script including \${b()}\`)
|
|
);
|
|
//# sourceMappingURL=script.body.script.js.js.map
|
|
</script>
|
|
|
|
|
|
Inline script including batman</body></html>
|
|
###########
|
|
# CONSOLE #
|
|
###########
|
|
[log] batman
|
|
[error] Failed to load resource: the server responded with a status of 404 (Not Found)
|
|
#############
|
|
# RESPONSES #
|
|
#############
|
|
200 http://localhost/script.html
|
|
404 http://localhost/favicon.ico
|
|
`;
|
|
|
|
exports[`basic simple 1`] = `
|
|
##############
|
|
# index.html #
|
|
##############
|
|
<html><head>
|
|
</head>
|
|
<body>
|
|
<script src="batman.js" type="module"></script>
|
|
|
|
|
|
</body></html>
|
|
#############
|
|
# batman.js #
|
|
#############
|
|
const b = ()=>'batman';
|
|
console.log(b());
|
|
|
|
export { b };
|
|
//# sourceMappingURL=batman.js.map
|
|
|
|
#################
|
|
# batman.js.map #
|
|
#################
|
|
{"version":3,"file":"batman.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;;;;"}
|
|
#################
|
|
# RENDERED HTML #
|
|
#################
|
|
<html><head>
|
|
</head>
|
|
<body>
|
|
<script src="batman.js" type="module"></script>
|
|
|
|
|
|
</body></html>
|
|
###########
|
|
# CONSOLE #
|
|
###########
|
|
[log] batman
|
|
#############
|
|
# RESPONSES #
|
|
#############
|
|
200 http://localhost/index.html
|
|
200 http://localhost/batman.js
|
|
200 http://localhost/favicon.ico
|
|
`;
|