1- import {
2- CompiledSharedOptions ,
3- WatchedTaskList ,
4- WorkerSharedOptions ,
5- } from "../src" ;
1+ import { WorkerSharedOptions } from "../src" ;
62import { getTasks } from "../src/getTasks" ;
73import { makeJobHelpers , makeWithPgClientFromClient } from "../src/helpers" ;
84import { makeEnhancedWithPgClient } from "../src/lib" ;
@@ -19,10 +15,10 @@ const abortPromise = new Promise<void>((_, reject) => {
1915describe ( "commonjs" , ( ) => {
2016 test ( "gets tasks from folder" , ( ) =>
2117 withPgClient ( async ( client ) => {
22- const { tasks, release, compiledSharedOptions } = ( await getTasks (
18+ const { tasks, release, compiledSharedOptions } = await getTasks (
2319 options ,
2420 `${ __dirname } /fixtures/tasks` ,
25- ) ) as WatchedTaskList & { compiledSharedOptions : CompiledSharedOptions } ;
21+ ) ;
2622 expect ( tasks ) . toBeTruthy ( ) ;
2723 expect ( Object . keys ( tasks ) . sort ( ) ) . toMatchInlineSnapshot ( `
2824Array [
@@ -56,10 +52,10 @@ Array [
5652
5753 test ( "get tasks from file (vanilla)" , ( ) =>
5854 withPgClient ( async ( client ) => {
59- const { tasks, release, compiledSharedOptions } = ( await getTasks (
55+ const { tasks, release, compiledSharedOptions } = await getTasks (
6056 options ,
6157 `${ __dirname } /fixtures/tasksFile.js` ,
62- ) ) as WatchedTaskList & { compiledSharedOptions : CompiledSharedOptions } ;
58+ ) ;
6359 expect ( tasks ) . toBeTruthy ( ) ;
6460 expect ( Object . keys ( tasks ) . sort ( ) ) . toMatchInlineSnapshot ( `
6561Array [
@@ -87,10 +83,10 @@ Array [
8783
8884 test ( "get tasks from file (vanilla-ts)" , ( ) =>
8985 withPgClient ( async ( client ) => {
90- const { tasks, release, compiledSharedOptions } = ( await getTasks (
86+ const { tasks, release, compiledSharedOptions } = await getTasks (
9187 options ,
9288 `${ __dirname } /fixtures/tasksFile-ts.js` ,
93- ) ) as WatchedTaskList & { compiledSharedOptions : CompiledSharedOptions } ;
89+ ) ;
9490 expect ( tasks ) . toBeTruthy ( ) ;
9591 expect ( Object . keys ( tasks ) . sort ( ) ) . toMatchInlineSnapshot ( `
9692Array [
@@ -120,10 +116,10 @@ Array [
120116
121117 test ( "get tasks from file (default)" , ( ) =>
122118 withPgClient ( async ( client ) => {
123- const { tasks, release, compiledSharedOptions } = ( await getTasks (
119+ const { tasks, release, compiledSharedOptions } = await getTasks (
124120 options ,
125121 `${ __dirname } /fixtures/tasksFile_default.js` ,
126- ) ) as WatchedTaskList & { compiledSharedOptions : CompiledSharedOptions } ;
122+ ) ;
127123 expect ( tasks ) . toBeTruthy ( ) ;
128124 expect ( Object . keys ( tasks ) . sort ( ) ) . toMatchInlineSnapshot ( `
129125Array [
@@ -151,10 +147,10 @@ Array [
151147
152148 test ( "get tasks from file (default-ts)" , ( ) =>
153149 withPgClient ( async ( client ) => {
154- const { tasks, release, compiledSharedOptions } = ( await getTasks (
150+ const { tasks, release, compiledSharedOptions } = await getTasks (
155151 options ,
156152 `${ __dirname } /fixtures/tasksFile_default-ts.js` ,
157- ) ) as WatchedTaskList & { compiledSharedOptions : CompiledSharedOptions } ;
153+ ) ;
158154 expect ( tasks ) . toBeTruthy ( ) ;
159155 expect ( Object . keys ( tasks ) . sort ( ) ) . toMatchInlineSnapshot ( `
160156Array [
@@ -184,10 +180,10 @@ Array [
184180describe ( "esm" , ( ) => {
185181 test ( "gets tasks from folder" , ( ) =>
186182 withPgClient ( async ( client ) => {
187- const { tasks, release, compiledSharedOptions } = ( await getTasks (
183+ const { tasks, release, compiledSharedOptions } = await getTasks (
188184 options ,
189185 `${ __dirname } /fixtures-esm/tasks` ,
190- ) ) as WatchedTaskList & { compiledSharedOptions : CompiledSharedOptions } ;
186+ ) ;
191187 expect ( tasks ) . toBeTruthy ( ) ;
192188 expect ( Object . keys ( tasks ) . sort ( ) ) . toMatchInlineSnapshot ( `
193189Array [
@@ -217,10 +213,10 @@ Array [
217213
218214 test ( "get tasks from file (vanilla)" , ( ) =>
219215 withPgClient ( async ( client ) => {
220- const { tasks, release, compiledSharedOptions } = ( await getTasks (
216+ const { tasks, release, compiledSharedOptions } = await getTasks (
221217 options ,
222218 `${ __dirname } /fixtures-esm/tasksFile.js` ,
223- ) ) as WatchedTaskList & { compiledSharedOptions : CompiledSharedOptions } ;
219+ ) ;
224220 expect ( tasks ) . toBeTruthy ( ) ;
225221 expect ( Object . keys ( tasks ) . sort ( ) ) . toMatchInlineSnapshot ( `
226222Array [
@@ -248,10 +244,10 @@ Array [
248244
249245 test ( "get tasks from file (default)" , ( ) =>
250246 withPgClient ( async ( client ) => {
251- const { tasks, release, compiledSharedOptions } = ( await getTasks (
247+ const { tasks, release, compiledSharedOptions } = await getTasks (
252248 options ,
253249 `${ __dirname } /fixtures-esm/tasksFile_default.js` ,
254- ) ) as WatchedTaskList & { compiledSharedOptions : CompiledSharedOptions } ;
250+ ) ;
255251 expect ( tasks ) . toBeTruthy ( ) ;
256252 expect ( Object . keys ( tasks ) . sort ( ) ) . toMatchInlineSnapshot ( `
257253Array [
0 commit comments