Skip to content

Commit cae3b06

Browse files
committed
Fix Sonar code smells
1 parent f6a9b81 commit cae3b06

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Origin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class Origin {
8686
this._cache.clean(query, this);
8787
}
8888

89-
_createQueryMethods(query, queryId) {
89+
_createQueryMethods(query, id) {
9090
const methods = {};
9191

9292
const updateData = (data, methodName, action, params) => {
@@ -107,7 +107,7 @@ export class Origin {
107107
methods[methodName].error = newData.error;
108108
this._emitChange(query, methodName);
109109
this._emitChangeAny({
110-
source: this._queries[queryId],
110+
source: this._queries[id],
111111
method: methodName,
112112
action,
113113
params

test/Origin.queries.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ test.describe("Origin queries", () => {
6161
});
6262

6363
test.describe("whith query", () => {
64-
const FOO_QUERY = { foo: "foo", foo2: "foo-2" };
64+
const FOO_CUSTOM_QUERY = { foo: "foo", foo2: "foo-2" };
6565
test.it("should pass the query value to the method", () => {
6666
return testOrigin
67-
.query(FOO_QUERY)
67+
.query(FOO_CUSTOM_QUERY)
6868
.create()
6969
.then(() => {
70-
return test.expect(spys.create.getCall(0).args[0]).to.deep.equal(FOO_QUERY);
70+
return test.expect(spys.create.getCall(0).args[0]).to.deep.equal(FOO_CUSTOM_QUERY);
7171
});
7272
});
7373

0 commit comments

Comments
 (0)