@@ -25,12 +25,12 @@ beforeEach(() => {
2525} ) ;
2626
2727it ( `doesn't complain if files are not on disk` , ( ) => {
28- const cache = new BundleCache ( '/foo/bar.json ' ) ;
28+ const cache = new BundleCache ( '/foo' ) ;
2929 expect ( cache . get ( ) ) . toEqual ( { } ) ;
3030} ) ;
3131
3232it ( `updates files on disk when calling set()` , ( ) => {
33- const cache = new BundleCache ( '/foo/bar.json ' ) ;
33+ const cache = new BundleCache ( '/foo' ) ;
3434 cache . set ( SOME_STATE ) ;
3535 expect ( mockReadFileSync ) . not . toHaveBeenCalled ( ) ;
3636 expect ( mockMkdirSync . mock . calls ) . toMatchInlineSnapshot ( `
@@ -46,7 +46,7 @@ it(`updates files on disk when calling set()`, () => {
4646 expect ( mockWriteFileSync . mock . calls ) . toMatchInlineSnapshot ( `
4747 Array [
4848 Array [
49- "/foo/bar.json ",
49+ "/foo/.kbn-optimizer-cache ",
5050 "{
5151 \\"cacheKey\\": \\"abc\\",
5252 \\"files\\": [
@@ -61,7 +61,7 @@ it(`updates files on disk when calling set()`, () => {
6161} ) ;
6262
6363it ( `serves updated state from memory` , ( ) => {
64- const cache = new BundleCache ( '/foo/bar.json ' ) ;
64+ const cache = new BundleCache ( '/foo' ) ;
6565 cache . set ( SOME_STATE ) ;
6666 jest . clearAllMocks ( ) ;
6767
@@ -72,7 +72,7 @@ it(`serves updated state from memory`, () => {
7272} ) ;
7373
7474it ( 'reads state from disk on get() after refresh()' , ( ) => {
75- const cache = new BundleCache ( '/foo/bar.json ' ) ;
75+ const cache = new BundleCache ( '/foo' ) ;
7676 cache . set ( SOME_STATE ) ;
7777 cache . refresh ( ) ;
7878 jest . clearAllMocks ( ) ;
@@ -83,15 +83,15 @@ it('reads state from disk on get() after refresh()', () => {
8383 expect ( mockReadFileSync . mock . calls ) . toMatchInlineSnapshot ( `
8484 Array [
8585 Array [
86- "/foo/bar.json ",
86+ "/foo/.kbn-optimizer-cache ",
8787 "utf8",
8888 ],
8989 ]
9090 ` ) ;
9191} ) ;
9292
9393it ( 'provides accessors to specific state properties' , ( ) => {
94- const cache = new BundleCache ( '/foo/bar.json ' ) ;
94+ const cache = new BundleCache ( '/foo' ) ;
9595
9696 expect ( cache . getModuleCount ( ) ) . toBe ( undefined ) ;
9797 expect ( cache . getReferencedFiles ( ) ) . toEqual ( undefined ) ;
0 commit comments