Skip to content

Commit

Permalink
fix: SyncTimeOffs module import in test
Browse files Browse the repository at this point in the history
  • Loading branch information
lyind committed Jul 25, 2023
1 parent 027af15 commit 69c00c5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/020-test-sync-timeoffs.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import assert from 'node:assert/strict';
import {generatePersonioTimeOffPayload_} from '../sync-timeoffs/SyncTimeOffs.js';

import fs from 'fs';
const {PeopleTime} = (await import('../lib-output/lib.js')).default;

eval(fs.readFileSync('sync-timeoffs/SyncTimeOffs.js') + '\n export {generatePersonioTimeOffPayload_};');

console.log("keys 1: ", typeof generatePersonioTimeOffPayload_);
console.log("keys 2: ", typeof PROPERTY_PREFIX);

// test generatePersonioTimeOffPayload_
for (const [timeOffInput, expectedPayload] of [
[{startAt: PeopleTime.fromISO8601('2016-05-16T00:00:00+05:00'), endAt: PeopleTime.fromISO8601('2016-05-16T24:00:00+05:00')}, {half_day_start: "1", half_day_end: "1"}],
Expand Down

0 comments on commit 69c00c5

Please sign in to comment.