Closed bpetetot closed 7 years ago
@fabienjuif
I have a problem with the test of ddb.append
that I don't understand.
An error occurred when I try to execute await ddb('name').append([])
in the test of append
.
FYI : if remove or skip all other tests, it works 😑
NEED HELP
There is two problems I see :
readFileAsync
returns undefined
Quick fix :
describe('server/api/ddb', () => {
beforeEach(() => {
fs.mkdirAsync.mockClear()
fs.writeFileAsync.mockClear()
fs.readFileAsync.mockClear()
fs.mkdirAsync.mockImplementation(jest.fn(async () => undefined))
fs.writeFileAsync.mockImplementation(jest.fn(async () => undefined))
fs.readFileAsync.mockImplementation(jest.fn(async () => '[]'))
})
@fabienjuif check it 🦄
6