Skip to content

Commit

Permalink
feat: get ci passing
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerAberbach committed May 12, 2024
1 parent 3c3ae6b commit 3ee1150
Show file tree
Hide file tree
Showing 3 changed files with 4,525 additions and 1,652 deletions.
19 changes: 9 additions & 10 deletions packages/grfnviz/test/browser/to-dot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@
* limitations under the License.
*/

/* eslint-disable no-restricted-syntax */
import grfn from '../../../../src/index.js'
import toDot from '../../src/browser/to-dot.js'

/* eslint-disable typescript/no-empty-function */
function a() {}
function b() {}
function c() {}
function d() {}
/* eslint-enable typescript/no-empty-function */

const run = grfn([[a, [b, c]], [b, [d]], [c, [d]], d])
const run = grfn({
a: [(arg1: number, arg2: number) => arg1 + arg2, [`b`, `c`]],
b: [(arg: number) => arg * 2, [`d`]],
c: [(arg: number) => arg * 3, [`d`]],
d: (arg: number) => arg * 4,
})

test(`toDot`, () => {
expect((toDot as any)({ graph: (run as any).gr })).toMatchSnapshot()
// @ts-expect-error Untyped.
// eslint-disable-next-line typescript/no-unsafe-assignment
expect(toDot({ graph: run.gr })).toMatchSnapshot()
})
Loading

0 comments on commit 3ee1150

Please sign in to comment.