1
1
const path = require ( "path" ) ;
2
2
const test = require ( "ava" ) ;
3
- const fs = require ( "fs" ) ;
3
+ const fs = require ( "fs-extra " ) ;
4
4
const { URL } = require ( "url" ) ;
5
5
const eleventyImage = require ( "../" ) ;
6
6
const sharp = require ( "sharp" ) ;
@@ -526,13 +526,13 @@ test("Keep a cache, don’t reuse with same file names and different options", a
526
526
} ) ;
527
527
528
528
test ( "Keep a cache, don’t reuse with if the image changes, check promise equality" , async t => {
529
- fs . copyFileSync ( "./test/modify-bio-original.jpg" , "./test/generated-modify-bio.jpg" ) ;
529
+ fs . copySync ( "./test/modify-bio-original.jpg" , "./test/generated-modify-bio.jpg" ) ;
530
530
531
531
let promise1 = eleventyImage ( "./test/generated-modify-bio.jpg" , {
532
532
outputDir : "./test/img/"
533
533
} ) ;
534
534
535
- fs . copyFileSync ( "./test/modify-bio-grayscale.jpg" , "./test/generated-modify-bio.jpg" ) ;
535
+ fs . copySync ( "./test/modify-bio-grayscale.jpg" , "./test/generated-modify-bio.jpg" ) ;
536
536
537
537
let promise2 = eleventyImage ( "./test/generated-modify-bio.jpg" , {
538
538
outputDir : "./test/img/"
@@ -542,13 +542,13 @@ test("Keep a cache, don’t reuse with if the image changes, check promise equal
542
542
} ) ;
543
543
544
544
test ( "Keep a cache, don’t reuse with if the image changes, check output" , async t => {
545
- fs . copyFileSync ( "./test/modify2-bio-original.jpg" , "./test/generated-modify2-bio.jpg" ) ;
545
+ fs . copySync ( "./test/modify2-bio-original.jpg" , "./test/generated-modify2-bio.jpg" ) ;
546
546
547
547
let stats1 = await eleventyImage ( "./test/generated-modify2-bio.jpg" , {
548
548
outputDir : "./test/img/"
549
549
} ) ;
550
550
551
- fs . copyFileSync ( "./test/modify2-bio-grayscale.jpg" , "./test/generated-modify2-bio.jpg" ) ;
551
+ fs . copySync ( "./test/modify2-bio-grayscale.jpg" , "./test/generated-modify2-bio.jpg" ) ;
552
552
553
553
let stats2 = await eleventyImage ( "./test/generated-modify2-bio.jpg" , {
554
554
outputDir : "./test/img/"
0 commit comments