Skip to content

Commit

Permalink
add tests for adding to a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiamanzati committed Nov 12, 2024
1 parent f165182 commit ed920cc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/no-floating-effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ Effect.succeed(true).pipe(Effect.runPromise);
`import { Effect } from "effect";
Effect.gen(function*(){
yield* Effect.succeed(true)
yield* Effect.succeed(true)
}).pipe(Effect.runPromise)
`,
`import { Effect } from "effect";
const variable = Effect.succeed(true)
`,
],
invalid: [
Expand All @@ -28,6 +32,14 @@ Effect.succeed(true);
Effect.gen(function*(){
Effect.succeed(true)
}).pipe(Effect.runPromise)
`,
errors: [{ line: 4, messageId: "floating" }],
},
{
code: `import { Effect } from "effect";
const variable = Effect.succeed(true);
variable;
`,
errors: [{ line: 4, messageId: "floating" }],
},
Expand Down

0 comments on commit ed920cc

Please sign in to comment.