mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -92,7 +92,7 @@ export class StateService implements IStateService {
|
||||
|
||||
private fileStorage: FileStorage;
|
||||
|
||||
constructor( @IEnvironmentService environmentService: IEnvironmentService, @ILogService logService: ILogService) {
|
||||
constructor(@IEnvironmentService environmentService: IEnvironmentService, @ILogService logService: ILogService) {
|
||||
this.fileStorage = new FileStorage(path.join(environmentService.userDataPath, 'storage.json'), error => logService.error(error));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import os = require('os');
|
||||
import path = require('path');
|
||||
import extfs = require('vs/base/node/extfs');
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as extfs from 'vs/base/node/extfs';
|
||||
import { getRandomTestPath } from 'vs/workbench/test/workbenchTestServices';
|
||||
import { writeFileAndFlushSync, mkdirp } from 'vs/base/node/extfs';
|
||||
import { FileStorage } from 'vs/platform/state/node/stateService';
|
||||
|
||||
suite('StateService', () => {
|
||||
@@ -21,9 +20,9 @@ suite('StateService', () => {
|
||||
extfs.del(parentDir, os.tmpdir(), done);
|
||||
});
|
||||
|
||||
test('Basics', done => {
|
||||
return mkdirp(parentDir).then(() => {
|
||||
writeFileAndFlushSync(storageFile, '');
|
||||
test('Basics', () => {
|
||||
return extfs.mkdirp(parentDir).then(() => {
|
||||
extfs.writeFileAndFlushSync(storageFile, '');
|
||||
|
||||
let service = new FileStorage(storageFile, () => null);
|
||||
|
||||
@@ -49,8 +48,6 @@ suite('StateService', () => {
|
||||
|
||||
service.setItem('some.null.key', null);
|
||||
assert.equal(service.getItem('some.null.key', 'some.default'), 'some.default');
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user