File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { beforeEach , describe , expect , it } from "vitest" ;
2
- import { Entry , resolveGaps , resolveGapsInDay } from "./entry" ;
2
+ import { Entry , resolveGaps , resolveGapsInDay } from "../../src/utils /entry" ;
3
3
4
4
describe ( "entry utils" , ( ) => {
5
5
let entries : Partial < Entry > [ ] ;
@@ -11,6 +11,12 @@ describe("entry utils", () => {
11
11
] ;
12
12
} ) ;
13
13
14
+ it ( "should detect no gaps if there are no entries" , ( ) => {
15
+ const gaps = resolveGapsInDay ( [ ] ) ;
16
+
17
+ expect ( gaps ) . toEqual ( [ ] ) ;
18
+ } ) ;
19
+
14
20
it ( "should detect gap between two entries" , ( ) => {
15
21
const gaps = resolveGapsInDay ( entries as Entry [ ] ) ;
16
22
@@ -55,8 +61,6 @@ describe("entry utils", () => {
55
61
56
62
const gapsPerDay = resolveGaps ( entries as Entry [ ] ) ;
57
63
58
- console . log ( gapsPerDay ) ;
59
-
60
64
expect ( gapsPerDay [ 1 ] ) . toHaveLength ( 1 ) ;
61
65
expect ( gapsPerDay [ 2 ] ) . toHaveLength ( 1 ) ;
62
66
} ) ;
You can’t perform that action at this time.
0 commit comments