Files
FlowPilot/tests/background-verification-flow-module.test.js
T
QLHazyCoder a0d6d1f050 feat: add verification flow helpers and integrate into background script
- Introduced a new module `verification-flow.js` containing verification flow helpers.
- Updated `background.js` to import and utilize the new verification flow helpers.
- Refactored existing verification-related functions to leverage the new helpers for improved code organization and maintainability.
- Added tests for the verification flow module to ensure proper integration and functionality.
2026-04-17 00:16:40 +08:00

18 lines
649 B
JavaScript

const test = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
test('background imports verification flow module', () => {
const source = fs.readFileSync('background.js', 'utf8');
assert.match(source, /background\/verification-flow\.js/);
});
test('verification flow module exposes a factory', () => {
const source = fs.readFileSync('background/verification-flow.js', 'utf8');
const globalScope = {};
const api = new Function('self', `${source}; return self.MultiPageBackgroundVerificationFlow;`)(globalScope);
assert.equal(typeof api?.createVerificationFlowHelpers, 'function');
});