@@ -20,15 +20,15 @@ describe('createSharedContext', () => {
2020 it ( 'should create context with React.createContext' , ( ) => {
2121 const createContextSpy = jest . spyOn ( React , 'createContext' ) ;
2222 // eslint-disable-next-line unicorn/import-index, global-require
23- const createSharedContext = require ( '../index.js ' ) ;
23+ const createSharedContext = require ( '../src/ index.ts ' ) ;
2424 createSharedContext ( 'myCoolDefaultValue' , 'sharedContext' ) ;
2525
2626 expect ( createContextSpy ) . toHaveBeenCalledWith ( 'myCoolDefaultValue' ) ;
2727 } ) ;
2828
2929 it ( 'should return the same context object if the key matches' , ( ) => {
3030 // eslint-disable-next-line unicorn/import-index, global-require
31- const createSharedContext = require ( '../index.js ' ) ;
31+ const createSharedContext = require ( '../src/ index.ts ' ) ;
3232 const testProvider = createSharedContext ( '' , 'sharedContext' ) ;
3333 const { Provider } = testProvider ;
3434 const testConsumer = createSharedContext ( '' , 'sharedContext' ) ;
@@ -54,7 +54,7 @@ describe('createSharedContext', () => {
5454
5555 it ( 'should not return the same context object if the key does not matches' , ( ) => {
5656 // eslint-disable-next-line unicorn/import-index, global-require
57- const createSharedContext = require ( '../index.js ' ) ;
57+ const createSharedContext = require ( '../src/ index.ts ' ) ;
5858 const defaultValue = 'default' ;
5959 const testProvider = createSharedContext ( '' , 'sharedContext' ) ;
6060 const { Provider } = testProvider ;
@@ -81,7 +81,7 @@ describe('createSharedContext', () => {
8181
8282 it ( 'should use the same default value from first call' , ( ) => {
8383 // eslint-disable-next-line unicorn/import-index, global-require
84- const createSharedContext = require ( '../index.js ' ) ;
84+ const createSharedContext = require ( '../src/ index.ts ' ) ;
8585 const defaultValue = 'default' ;
8686 createSharedContext ( defaultValue , 'someContext' ) ;
8787 const testDefaultContext = createSharedContext ( 'never see this' , 'someContext' ) ;
@@ -106,7 +106,7 @@ describe('createSharedContext', () => {
106106 const createContextSpy = jest . spyOn ( React , 'createContext' ) ;
107107 const warnSpy = jest . spyOn ( console , 'warn' ) ;
108108 // eslint-disable-next-line unicorn/import-index, global-require
109- const createSharedContext = require ( '../index.js ' ) ;
109+ const createSharedContext = require ( '../src/ index.ts ' ) ;
110110
111111 createSharedContext ( 'default' ) ;
112112 expect ( warnSpy ) . toHaveBeenCalledWith ( 'Second parameter in createSharedReactContext was not set, defaulting to React.createContext' ) ;
0 commit comments