chore: keep overseas PDA validation local

This commit is contained in:
2026-09-11 15:45:04 +08:00
parent 3efb049948
commit efaa4f9d7e
3 changed files with 1 additions and 121 deletions
-23
View File
@@ -1,23 +0,0 @@
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import test from 'node:test'
const pipeline = readFileSync(new URL('../Jenkinsfile', import.meta.url), 'utf8')
test('test H5 deployment validates the exact overseas PDA site root', () => {
assert.match(pipeline, /TEST_SITE_ROOT = '\/www\/wwwroot\/test-pda-global\.buggoglobal\.com'/)
assert.match(pipeline, /test "\$target" = '\/www\/wwwroot\/test-pda-global\.buggoglobal\.com'/)
})
test('test H5 deployment replaces only generated assets and keeps host files', () => {
assert.match(pipeline, /for entry in index\.html assets static/)
assert.doesNotMatch(pipeline, /rm -rf "?\$target"?\/\*/)
for (const preserved of ['.well-known', '.user.ini', '.htaccess', '404.html']) {
assert.doesNotMatch(pipeline, new RegExp(`rm -rf [^\\n]*${preserved.replace('.', '\\.')}`))
}
})
test('test H5 deployment runs tests and asserts the neutral empty-result copy before publishing', () => {
assert.match(pipeline, /npm ci && npm test && npm run build:h5/)
assert.match(pipeline, /当前绑定仓没有匹配的待签收或签收中退货单/)
})