Skip to content

Commit a99c574

Browse files
committed
test(workflow-sdk): move the SYNTAX.md diagnostics-table check out of browser-safe workflow-code
workflow-code type-checks without node types, so a test reading SYNTAX.md cannot live there. The workflow-sdk README is the one that calls the table complete, so its package holds the check.
1 parent 495bf5b commit a99c574

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/workflow-code/src/diagnostics/codes.test.ts renamed to packages/workflow-sdk/src/diagnostics-table.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { readFileSync } from 'node:fs'
22
import path from 'node:path'
3+
import { DIAGNOSTIC_CODES } from '@sim/workflow-code/diagnostics/codes'
34
import { describe, expect, it } from 'vitest'
4-
import { DIAGNOSTIC_CODES } from './codes'
55

6-
describe('DIAGNOSTIC_CODES', () => {
7-
it('each has a row in the SYNTAX.md Diagnostics table, and the table names no other code', () => {
6+
describe('the Diagnostics table the README points at', () => {
7+
it('has a SYNTAX.md row for every diagnostic code, and names no other code', () => {
88
const syntax = readFileSync(
9-
path.join(import.meta.dirname, '..', 'compile', 'SYNTAX.md'),
9+
path.join(import.meta.dirname, '../../workflow-code/src/compile/SYNTAX.md'),
1010
'utf8'
1111
)
1212
const firstCells = [...syntax.matchAll(/^\| (`[EWI]_[A-Z_]+`(?:, `[EWI]_[A-Z_]+`)*) \|/gm)]

0 commit comments

Comments
 (0)