Skip to content

Commit f230669

Browse files
author
Arthur Cinader
committed
let's try another debug approach :).
1 parent 4790e49 commit f230669

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"dev": "npm run build && node bin/dev",
7070
"lint": "eslint --cache ./",
7171
"build": "babel src/ -d lib/",
72-
"pretest": "npm run lint",
72+
7373
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 NODE_ENV=test TESTING=1 $COVERAGE_OPTION jasmine",
7474
"test:win": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=3.2.6} MONGODB_STORAGE_ENGINE=mmapv1 NODE_ENV=test TESTING=1 jasmine",
7575
"coverage": "cross-env COVERAGE_OPTION='./node_modules/.bin/istanbul cover' npm test",

spec/FilesController.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const mockAdapter = {
1010
},
1111
deleteFile: () => { },
1212
getFileData: () => { },
13-
getFileLocation: () => { }
13+
getFileLocation: () => 'xyz'
1414
}
1515

1616
// Small additional tests to improve overall coverage
@@ -38,7 +38,7 @@ describe("FilesController",() =>{
3838
done();
3939
});
4040

41-
it('should create a server log on failure', done => {
41+
fit('should create a server log on failure', done => {
4242
const logController = new LoggerController(new WinstonLoggerAdapter());
4343

4444
reconfigureServer({ filesAdapter: mockAdapter })

src/Controllers/FilesController.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class FilesController extends AdaptableController {
1414
}
1515

1616
createFile(config, filename, data, contentType) {
17-
17+
console.log('a');
1818
const extname = path.extname(filename);
1919

2020
const hasExtension = extname.length > 0;
@@ -26,9 +26,10 @@ export class FilesController extends AdaptableController {
2626
}
2727

2828
filename = randomHexString(32) + '_' + filename;
29-
3029
var location = this.adapter.getFileLocation(config, filename);
30+
console.log('b');
3131
return this.adapter.createFile(filename, data, contentType).then(() => {
32+
console.log('c');
3233
return Promise.resolve({
3334
url: location,
3435
name: filename

0 commit comments

Comments
 (0)