Skip to content

Commit 7fad057

Browse files
committed
Stuff
1 parent 1544c0f commit 7fad057

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"build:main": "node build/build.js",
1717
"clean": "rm -rf dist && rm -rf lib && rm -rf dist && rm -rf coverage && rm -rf .nyc_output && rm -rf .tmp",
1818
"lint": "tslint 'src/**/*.ts' -c tslint.json -p . --fix",
19-
"test": "mocha-webpack --webpack-config test/webpack.config.js --require test/bootstrap.js 'test/**/*.spec.js'",
20-
"test:watch": "mocha-webpack --webpack-config test/webpack.config.js --watch --require test/bootstrap.js 'test/**/*.spec.js'",
21-
"test:coverage": "mocha-webpack --webpack-config test/webpack.config.js --require test/bootstrap.js 'src/**/*.js' 'test/**/*.spec.js'",
19+
"test": "NODE_ENV=test mocha-webpack --webpack-config test/webpack.config.js --require test/bootstrap.js 'test/**/*.spec.js'",
20+
"test:watch": "NODE_ENV=test mocha-webpack --webpack-config test/webpack.config.js --watch --require test/bootstrap.js 'test/**/*.spec.js'",
21+
"test:coverage": "NODE_ENV=test mocha-webpack --webpack-config test/webpack.config.js --require test/bootstrap.js 'src/**/*.js' 'test/**/*.spec.js'",
2222
"coverage": "NODE_ENV=coverage nyc --reporter=lcov --reporter=text npm run test:coverage",
2323
"prepare": "npm run lint && npm run test && npm run build"
2424
},

src/logger.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export default class Logger {
1313

1414
public group (...messages: Array<any>): void {
1515
if (this.enabled) {
16-
console.groupCollapsed('[Vuex-ORM-Apollo]', ...messages);
16+
if (process.env.NODE_ENV === 'test') {
17+
console.group('[Vuex-ORM-Apollo]', ...messages);
18+
} else {
19+
console.groupCollapsed('[Vuex-ORM-Apollo]', ...messages);
20+
}
1721
}
1822
}
1923

src/queryBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export default class QueryBuilder {
239239
if (typeof value === 'object' && value.__type) {
240240
// Case 2 (User!)
241241
typeOrValue = value.__type + 'Input!';
242-
} else if (key === 'id' || key.endsWith('Id')) {
242+
} else if (key === 'id' || key.endsWith('Id')) { // FIXME not all 'xxxId' fields are of type ID!
243243
// Case 1 (ID!)
244244
typeOrValue = 'ID!';
245245
} else {

0 commit comments

Comments
 (0)