mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-07 00:01:49 +00:00
* feat: add wac ai context * fix: limit wac context languages * fix: pass wac auto kind in flow script drawer
20 lines
631 B
TypeScript
20 lines
631 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { isWorkflowAsCode } from './wacToFlow'
|
|
|
|
const tsWac = `
|
|
import { workflow, task } from "windmill-client"
|
|
|
|
const process = task(async () => "ok")
|
|
|
|
export const main = workflow(async () => await process())
|
|
`
|
|
|
|
describe('isWorkflowAsCode', () => {
|
|
it('detects WAC only for Bun TypeScript and Python', () => {
|
|
expect(isWorkflowAsCode(tsWac, 'bun')).toBe(true)
|
|
expect(isWorkflowAsCode(tsWac, 'deno')).toBe(false)
|
|
expect(isWorkflowAsCode(tsWac, 'nativets')).toBe(false)
|
|
expect(isWorkflowAsCode('@workflow\nasync def main():\n return None\n', 'python3')).toBe(true)
|
|
})
|
|
})
|