Preview: Dev-Registrierung nutzt gespeicherten Branch und Stand
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cf2841adf5
commit
3316b562af
5 files changed
+96
-56
No files matched your search
@@ -17,10 +17,10 @@ function mockClient(existing = []) {
|
||||
}
|
||||
}
|
||||
|
||||
test('Schema: genau die 7 Attribute mit Groessen, alle optional', () => {
|
||||
test('Schema: genau die 8 Attribute mit Groessen, alle optional', () => {
|
||||
assert.deepEqual(
|
||||
PREVIEW_RUNNER_ATTRIBUTES.map((a) => a.key),
|
||||
['previewMode', 'previewEnv', 'previewState', 'previewDetected', 'previewBuiltSha', 'previewBuiltAt', 'previewError']
|
||||
['previewMode', 'previewEnv', 'previewState', 'previewDetected', 'previewBuiltSha', 'previewBranch', 'previewBuiltAt', 'previewError']
|
||||
)
|
||||
assert.ok(PREVIEW_RUNNER_ATTRIBUTES.every((a) => a.required === false && a.type === 'string'))
|
||||
const sizes = Object.fromEntries(PREVIEW_RUNNER_ATTRIBUTES.map((a) => [a.key, a.size]))
|
||||
@@ -30,6 +30,7 @@ test('Schema: genau die 7 Attribute mit Groessen, alle optional', () => {
|
||||
previewState: 20,
|
||||
previewDetected: 40,
|
||||
previewBuiltSha: 40,
|
||||
previewBranch: 100,
|
||||
previewBuiltAt: 40,
|
||||
previewError: 500,
|
||||
})
|
||||
@@ -38,16 +39,16 @@ test('Schema: genau die 7 Attribute mit Groessen, alle optional', () => {
|
||||
test('main legt nur fehlende Attribute an', async () => {
|
||||
const client = mockClient(['previewMode'])
|
||||
const result = await main({ check: false, client, log: () => {} })
|
||||
assert.equal(client.created.length, 6)
|
||||
assert.equal(client.created.length, 7)
|
||||
assert.ok(!client.created.includes('previewMode'))
|
||||
assert.equal(result.missing.length, 6)
|
||||
assert.equal(result.missing.length, 7)
|
||||
})
|
||||
|
||||
test('main --check legt nichts an und meldet Fehlende', async () => {
|
||||
const client = mockClient(['previewMode'])
|
||||
const result = await main({ check: true, client, log: () => {} })
|
||||
assert.equal(client.created.length, 0)
|
||||
assert.equal(result.missing.length, 6)
|
||||
assert.equal(result.missing.length, 7)
|
||||
})
|
||||
|
||||
test('Konfiguration: previewRunner ist standardmaessig aus', () => {
|
||||
|
||||
Reference in new issue
Block a user