-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
493: fixed issue with oe formatting, updated project formatting and s…
…ettings, updated imports
- Loading branch information
Showing
20 changed files
with
1,227 additions
and
1,075 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"prettier.singleQuote": true, | ||
"prettier.printWidth": 70, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
"editor.formatOnSave": true, | ||
"prettier.singleQuote": true, | ||
"singleQuote": true, | ||
"jsxSingleQuote": true, | ||
"tabWidth": 4, | ||
"prettier.printWidth": 70, | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
const path = require("path"); | ||
const path = require('path'); | ||
/** @type {import('jest').Config} */ | ||
const config = { | ||
roots: [ | ||
"<rootDir>/src/test/nodeTest" | ||
], | ||
roots: ['<rootDir>/src/test/nodeTest', '<rootDir>/src/test/viewTest'], | ||
globals: { | ||
__DEV__: true | ||
}, | ||
}; | ||
__DEV__: true, | ||
}, | ||
}; | ||
|
||
module.exports = config; | ||
module.exports = config; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { expect } from "@jest/globals"; | ||
import { getOEFormatLength } from "../../../../../view/app/utils/oe/format/oeFormat"; | ||
|
||
describe("getOEFormatLength", () => { | ||
it('should return the correct length for "xxx"', () => { | ||
expect(getOEFormatLength("xxx")).toBe(3); | ||
}); | ||
|
||
it('should return the correct length for "x(40)"', () => { | ||
expect(getOEFormatLength("x(40)")).toBe(40); | ||
}); | ||
|
||
it('should return the correct length for "$>>.>>>"', () => { | ||
expect(getOEFormatLength("$>>.>>>")).toBe(6); | ||
}); | ||
|
||
it('should return the correct length for "99.>>>"', () => { | ||
expect(getOEFormatLength("99.>>>")).toBe(5); | ||
}); | ||
|
||
it('should return the correct length for "9(7)"', () => { | ||
expect(getOEFormatLength("9(7)")).toBe(7); | ||
}); | ||
|
||
it('should return the correct length for "99"', () => { | ||
expect(getOEFormatLength("99")).toBe(2); | ||
}); | ||
|
||
it('should return the correct length for "ABBBBEEEE"', () => { | ||
expect(getOEFormatLength("ABBBBEEEE")).toBe(9); | ||
}); | ||
|
||
it('should return the correct length for "99KKTB"', () => { | ||
expect(getOEFormatLength("99KKTB")).toBe(6); | ||
}); | ||
|
||
it('should return the correct length for "zzz,zzz,zz"', () => { | ||
expect(getOEFormatLength("zzz,zzz,zz")).toBe(8); | ||
}); | ||
|
||
it('should return the correct length for "z"', () => { | ||
expect(getOEFormatLength("z")).toBe(1); | ||
}); | ||
|
||
it('should return the correct length for ""', () => { | ||
expect(getOEFormatLength("")).toBe(6); | ||
}); | ||
|
||
it("should return 100 if the calculated length is greater than 100", () => { | ||
const longFormat = "X".repeat(200); | ||
expect(getOEFormatLength(longFormat)).toBe(100); | ||
}); | ||
|
||
it("should return 6 if the calculated length is less than or equal to 0", () => { | ||
expect(getOEFormatLength("")).toBe(6); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
import * as React from "react"; | ||
import { createRoot } from "react-dom/client"; | ||
import { createRoot } from 'react-dom/client'; | ||
|
||
import "./connection.css"; | ||
import ConnectionForm from "./connectionForm"; | ||
import { IConfig } from "../model"; | ||
import { ISettings } from "../../../common/IExtensionSettings"; | ||
import './connection.css'; | ||
import ConnectionForm from './connectionForm'; | ||
import { IConfig } from '@app/model'; | ||
import { ISettings } from '@src/common/IExtensionSettings'; | ||
|
||
declare global { | ||
interface Window { | ||
acquireVsCodeApi(): any; | ||
initialData: IConfig; | ||
configuration: ISettings; | ||
} | ||
interface Window { | ||
acquireVsCodeApi(): any; | ||
initialData: IConfig; | ||
configuration: ISettings; | ||
} | ||
} | ||
|
||
const vscode = window.acquireVsCodeApi(); | ||
|
||
const root = createRoot(document.getElementById("root")); | ||
const root = createRoot(document.getElementById('root')); | ||
root.render( | ||
<ConnectionForm | ||
initialData={window.initialData} | ||
configuration={window.configuration} | ||
vscode={vscode} | ||
/> | ||
<ConnectionForm | ||
initialData={window.initialData} | ||
configuration={window.configuration} | ||
vscode={vscode} | ||
/> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
import * as React from "react"; | ||
import { createRoot } from "react-dom/client"; | ||
import "./fields.css"; | ||
import Fields from "./fields"; | ||
import { TableDetails } from "../model"; | ||
import { ISettings } from "../../../common/IExtensionSettings"; | ||
import { createRoot } from 'react-dom/client'; | ||
import './fields.css'; | ||
import Fields from './fields'; | ||
import { TableDetails } from '@app/model'; | ||
import { ISettings } from '@src/common/IExtensionSettings'; | ||
|
||
declare global { | ||
interface Window { | ||
acquireVsCodeApi(): any; | ||
tableDetails: TableDetails; | ||
configuration: ISettings; | ||
} | ||
interface Window { | ||
acquireVsCodeApi(): any; | ||
tableDetails: TableDetails; | ||
configuration: ISettings; | ||
} | ||
} | ||
|
||
const vscode = window.acquireVsCodeApi(); | ||
|
||
const root = createRoot(document.getElementById("root")); | ||
const root = createRoot(document.getElementById('root')); | ||
root.render( | ||
<Fields | ||
tableDetails={window.tableDetails} | ||
configuration={window.configuration} | ||
vscode={vscode} | ||
/> | ||
<Fields | ||
tableDetails={window.tableDetails} | ||
configuration={window.configuration} | ||
vscode={vscode} | ||
/> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
import * as React from "react"; | ||
|
||
import { createRoot } from "react-dom/client"; | ||
import { TableDetails } from "../model"; | ||
import "./indexes.css"; | ||
import Indexes from "./indexes"; | ||
import { ISettings } from "../../../common/IExtensionSettings"; | ||
import { createRoot } from 'react-dom/client'; | ||
import { TableDetails } from '@app/model'; | ||
import './indexes.css'; | ||
import Indexes from './indexes'; | ||
import { ISettings } from '@src/common/IExtensionSettings'; | ||
|
||
declare global { | ||
interface Window { | ||
acquireVsCodeApi(): any; | ||
tableDetails: TableDetails; | ||
configuration: ISettings; | ||
} | ||
interface Window { | ||
acquireVsCodeApi(): any; | ||
tableDetails: TableDetails; | ||
configuration: ISettings; | ||
} | ||
} | ||
const vscode = window.acquireVsCodeApi(); | ||
|
||
const root = createRoot(document.getElementById("root")); | ||
root.render(<Indexes tableDetails={window.tableDetails} configuration={window.configuration} vscode={vscode}/>); | ||
const root = createRoot(document.getElementById('root')); | ||
root.render( | ||
<Indexes | ||
tableDetails={window.tableDetails} | ||
configuration={window.configuration} | ||
vscode={vscode} | ||
/> | ||
); |
Oops, something went wrong.