We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r.row is not defined in this context
Using r.row() in this query results in error
r.row()
I've got the following function which I'm testing using this library and jest.
async addPlayerKills(kills: number): Promise<any> { return await r.table('users').get(this.user.id).update({ playerkills: r.row('playerkills').default(0).add(kills), }) }
To test it, I'm using the following block:
test('Should add player kills', async () => { await user.addPlayerKills(1) const userData = await user.get() expect(userData?.playerkills).toBe(1) })
But instead of getting any data, I get the error r.row is not defined in this context, from the line at https://github.com/aleclarson/rethinkdb-mock/blob/master/src/Query.coffee#L316
The user.get() method is just a simple call to r.table('users').get()
user.get()
r.table('users').get()
Jest: 26.6.3 Rethinkdb-Mock: 0.7.1 Node: 14.17.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the problem
Using
r.row()
in this query results in errorI've got the following function which I'm testing using this library and jest.
To test it, I'm using the following block:
But instead of getting any data, I get the error
r.row is not defined in this context
, from the line at https://github.com/aleclarson/rethinkdb-mock/blob/master/src/Query.coffee#L316The
user.get()
method is just a simple call tor.table('users').get()
Environment:
Jest: 26.6.3
Rethinkdb-Mock: 0.7.1
Node: 14.17.0
The text was updated successfully, but these errors were encountered: