Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvraj108c committed Sep 12, 2022
1 parent e1c6290 commit a1121c9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
10 changes: 9 additions & 1 deletion test/image_slideshow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ const IP = new InstagramPublisher({
});

beforeAll(() => {
fs.writeFileSync('cookies.json', JSON.stringify([{}]));
fs.writeFileSync(
'cookies.json',
JSON.stringify([
{
key: 'sessionid',
expires: new Date('2100-09-11T12:56:18.000Z').toISOString(),
},
])
);
});

afterAll(() => {
Expand Down
10 changes: 9 additions & 1 deletion test/single_image.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ const IP = new InstagramPublisher({
});

beforeAll(() => {
fs.writeFileSync('cookies.json', JSON.stringify([{}]));
fs.writeFileSync(
'cookies.json',
JSON.stringify([
{
key: 'sessionid',
expires: new Date('2100-09-11T12:56:18.000Z').toISOString(),
},
])
);
});

afterAll(() => {
Expand Down
10 changes: 9 additions & 1 deletion test/single_reel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ const IP = new InstagramPublisher({
});

beforeAll(() => {
fs.writeFileSync('cookies.json', JSON.stringify([{}]));
fs.writeFileSync(
'cookies.json',
JSON.stringify([
{
key: 'sessionid',
expires: new Date('2100-09-11T12:56:18.000Z').toISOString(),
},
])
);
});

afterAll(() => {
Expand Down
10 changes: 9 additions & 1 deletion test/single_video.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ const IP = new InstagramPublisher({
});

beforeAll(() => {
fs.writeFileSync('cookies.json', JSON.stringify([{}]));
fs.writeFileSync(
'cookies.json',
JSON.stringify([
{
key: 'sessionid',
expires: new Date('2100-09-11T12:56:18.000Z').toISOString(),
},
])
);
});

afterAll(() => {
Expand Down

0 comments on commit a1121c9

Please sign in to comment.