mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 08:42:08 +10:00
Attempt to test Builder, using Firebase mock
This commit is contained in:
14
__mocks__/gatsby-plugin-firebase.js
Normal file
14
__mocks__/gatsby-plugin-firebase.js
Normal file
@ -0,0 +1,14 @@
|
||||
import demoResume from '../src/data/demoState.json';
|
||||
|
||||
module.exports = {
|
||||
database: jest.fn().mockReturnValue({
|
||||
ref: jest.fn().mockReturnValue({
|
||||
once: jest.fn().mockResolvedValue({
|
||||
val: jest.fn().mockReturnValue(demoResume),
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
auth: jest.fn().mockReturnValue({
|
||||
onAuthStateChanged: jest.fn(),
|
||||
}),
|
||||
};
|
||||
Reference in New Issue
Block a user