Small mistakes.
This commit is contained in:
parent
56cec7a835
commit
26234c2478
3 changed files with 4 additions and 6 deletions
|
@ -29,7 +29,7 @@ export class Settings extends EventEmitter {
|
||||||
#matrixFile: null | string;
|
#matrixFile: null | string;
|
||||||
matrix?: EliteMatrix;
|
matrix?: EliteMatrix;
|
||||||
|
|
||||||
private constructor(isPackaged: boolean) {
|
private constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.#file = path.join(os.homedir(), 'ed-safari-settings.json');
|
this.#file = path.join(os.homedir(), 'ed-safari-settings.json');
|
||||||
|
@ -61,9 +61,9 @@ export class Settings extends EventEmitter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static get(isPackaged: boolean = false): Settings {
|
static get(): Settings {
|
||||||
if (!Settings.#instance) {
|
if (!Settings.#instance) {
|
||||||
Settings.#instance = new Settings(isPackaged);
|
Settings.#instance = new Settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Settings.#instance;
|
return Settings.#instance;
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { Settings } from '../src/models/Settings';
|
||||||
import { mockSettings } from './mockData';
|
import { mockSettings } from './mockData';
|
||||||
|
|
||||||
jest.mock('fs');
|
jest.mock('fs');
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
describe('Settings', () => {
|
describe('Settings', () => {
|
||||||
const settingsFile = {
|
const settingsFile = {
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
// noinspection DuplicatedCode
|
// noinspection DuplicatedCode
|
||||||
|
|
||||||
import { expect, jest, it, beforeEach } from '@jest/globals';
|
import { expect, jest, it, beforeEach } from '@jest/globals';
|
||||||
import { ExtendedNavRoute, FSDJump, Location } from '@kayahr/ed-journal';
|
import { FSDJump, Location } from '@kayahr/ed-journal';
|
||||||
import { Body } from '../src/models/Body';
|
import { Body } from '../src/models/Body';
|
||||||
import { CMDR } from '../src/models/CMDR';
|
import { CMDR } from '../src/models/CMDR';
|
||||||
import { EDSM } from '../src/models/EDSM';
|
import { EDSM } from '../src/models/EDSM';
|
||||||
import { Journal } from '../src/models/Journal';
|
|
||||||
import { ExtendedNavRouteSystem, System } from '../src/models/System';
|
import { ExtendedNavRouteSystem, System } from '../src/models/System';
|
||||||
import { mockEdsmResponses, mockObjects } from './mockData';
|
import { mockEdsmResponses, mockObjects } from './mockData';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue