node/test/sea/test-single-executable-application-assets.js
Joyee Cheung 6eaf1b85ed
test: migrate to --build-sea in existing SEA tests
Only leave a smoking test for the postject-based workflow
in test-single-executable-application.js

PR-URL: https://github.com/nodejs/node/pull/61167
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-01-22 23:32:51 +01:00

36 lines
763 B
JavaScript

'use strict';
// This tests the assets support in single executable applications.
require('../common');
const {
buildSEA,
skipIfBuildSEAIsNotSupported,
} = require('../common/sea');
skipIfBuildSEAIsNotSupported();
const tmpdir = require('../common/tmpdir');
const {
spawnSyncAndAssert,
} = require('../common/child_process');
const fixtures = require('../common/fixtures');
tmpdir.refresh();
const outputFile = buildSEA(fixtures.path('sea', 'assets'));
spawnSyncAndAssert(
outputFile,
{
env: {
...process.env,
NODE_DEBUG_NATIVE: 'SEA',
__TEST_PERSON_JPG: fixtures.path('person.jpg'),
__TEST_UTF8_TEXT_PATH: fixtures.path('utf8_test_text.txt'),
},
},
{
trim: true,
stdout: fixtures.utf8TestText,
},
);