4 lines
1.2 KiB
JavaScript
4 lines
1.2 KiB
JavaScript
import test from 'node:test';import assert from 'node:assert/strict';import {readFileSync} from 'node:fs';
|
|
import {BANK_IMPORTS} from '../control-panel/public/cp-v2/cp-v2-bank-pages.mjs';
|
|
test('the new bank pages use the independent central bank service, never the old game iframe',()=>{for(const id of ['bank-information','bank-overview','personal-bank'])assert.equal(BANK_IMPORTS[id].kind,'foundation');const source=readFileSync(new URL('../control-panel/public/cp-v2/cp-v2-bank-pages.mjs',import.meta.url),'utf8');assert.doesNotMatch(source,/mountNativeService|banking\.mjs|mountImperialRevenue/);assert.equal(BANK_IMPORTS['bank-transfers'].kind,'payments');});
|
|
test('the first bank visit reads records, and acceptance is the only account creation action',()=>{const source=readFileSync(new URL('../control-panel/public/cp-v2/cp-v2-postbank-foundation.mjs',import.meta.url),'utf8');assert.match(source,/api\.request\('\/api\/bank\/overview'\)/);assert.match(source,/api\.request\('\/api\/bank\/activate'/);assert.match(source,/Accept & Generate/);assert.match(source,/termsVersion:view\.termsVersion,accepted:true/);assert.doesNotMatch(source,/\/bank\/player|15433|transfer-own/);});
|

Staff