Files
FlowPilot/tests/background-step-modules.test.js
2026-05-21 07:21:34 +08:00

31 lines
1.3 KiB
JavaScript

const test = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
test('background imports workflow step modules including rebuilt Kiro modules', () => {
const source = fs.readFileSync('background.js', 'utf8');
[
'flows/openai/background/steps/open-chatgpt.js',
'flows/openai/background/steps/submit-signup-email.js',
'flows/openai/background/steps/fill-password.js',
'flows/openai/background/steps/fetch-signup-code.js',
'flows/openai/background/steps/fill-profile.js',
'flows/openai/background/steps/wait-registration-success.js',
'flows/openai/background/steps/oauth-login.js',
'flows/openai/background/steps/fetch-login-code.js',
'flows/openai/background/steps/confirm-oauth.js',
'flows/openai/background/steps/platform-verify.js',
'shared/kiro-timeouts.js',
'flows/kiro/background/state.js',
'flows/kiro/background/register-runner.js',
'flows/kiro/background/desktop-client.js',
'flows/kiro/background/desktop-authorize-runner.js',
'flows/kiro/background/publisher-kiro-rs.js',
].forEach((path) => {
assert.match(source, new RegExp(path.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
});
assert.doesNotMatch(source, /background\/steps\/kiro-device-auth\.js/);
});