mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
97 lines
2.2 KiB
Plaintext
97 lines
2.2 KiB
Plaintext
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
|
|
exports[`Bun.build Bun.write(BuildArtifact) 1`] = `
|
|
"var __defProp = Object.defineProperty;
|
|
var __export = (target, all) => {
|
|
for (var name in all)
|
|
__defProp(target, name, {
|
|
get: all[name],
|
|
enumerable: true,
|
|
configurable: true,
|
|
set: (newValue) => all[name] = () => newValue
|
|
});
|
|
};
|
|
|
|
// test/bundler/fixtures/trivial/fn.js
|
|
var exports_fn = {};
|
|
__export(exports_fn, {
|
|
fn: () => fn
|
|
});
|
|
function fn(a) {
|
|
return a + 42;
|
|
}
|
|
|
|
// test/bundler/fixtures/trivial/index.js
|
|
var NS = Promise.resolve().then(() => exports_fn);
|
|
NS.then(({ fn: fn2 }) => {
|
|
console.log(fn2(42));
|
|
});
|
|
"
|
|
`;
|
|
|
|
exports[`Bun.build outdir + reading out blobs works 1`] = `
|
|
"var __defProp = Object.defineProperty;
|
|
var __export = (target, all) => {
|
|
for (var name in all)
|
|
__defProp(target, name, {
|
|
get: all[name],
|
|
enumerable: true,
|
|
configurable: true,
|
|
set: (newValue) => all[name] = () => newValue
|
|
});
|
|
};
|
|
|
|
// test/bundler/fixtures/trivial/fn.js
|
|
var exports_fn = {};
|
|
__export(exports_fn, {
|
|
fn: () => fn
|
|
});
|
|
function fn(a) {
|
|
return a + 42;
|
|
}
|
|
|
|
// test/bundler/fixtures/trivial/index.js
|
|
var NS = Promise.resolve().then(() => exports_fn);
|
|
NS.then(({ fn: fn2 }) => {
|
|
console.log(fn2(42));
|
|
});
|
|
"
|
|
`;
|
|
|
|
exports[`Bun.build BuildArtifact properties: hash 1`] = `"d1c7nm6t"`;
|
|
|
|
exports[`Bun.build BuildArtifact properties + entry.naming: hash 1`] = `"rm7e36cf"`;
|
|
|
|
exports[`Bun.build BuildArtifact properties sourcemap: hash index.js 1`] = `"d1c7nm6t"`;
|
|
|
|
exports[`Bun.build BuildArtifact properties sourcemap: hash index.js.map 1`] = `"00000000"`;
|
|
|
|
exports[`Bun.build new Response(BuildArtifact) sets content type: response text 1`] = `
|
|
"var __defProp = Object.defineProperty;
|
|
var __export = (target, all) => {
|
|
for (var name in all)
|
|
__defProp(target, name, {
|
|
get: all[name],
|
|
enumerable: true,
|
|
configurable: true,
|
|
set: (newValue) => all[name] = () => newValue
|
|
});
|
|
};
|
|
|
|
// test/bundler/fixtures/trivial/fn.js
|
|
var exports_fn = {};
|
|
__export(exports_fn, {
|
|
fn: () => fn
|
|
});
|
|
function fn(a) {
|
|
return a + 42;
|
|
}
|
|
|
|
// test/bundler/fixtures/trivial/index.js
|
|
var NS = Promise.resolve().then(() => exports_fn);
|
|
NS.then(({ fn: fn2 }) => {
|
|
console.log(fn2(42));
|
|
});
|
|
"
|
|
`;
|