Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wtetsu committed Nov 22, 2024
1 parent fde6cdb commit 0952d27
Show file tree
Hide file tree
Showing 20 changed files with 4,567 additions and 10,477 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
- name: Run Unit Tests
run: npm run test-cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: ./coverage/lcov.info
files: ./coverage/coverage-final.json
flags: unittests
name: codecov-coverage
token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 5 additions & 5 deletions __test__/main/core/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ afterEach(() => {
env.enableWindowStatusSave = true;
});

test("", async () => {
test("loadAll should return consistent settings and position", async () => {
const { settings, position } = await config.loadAll();
expect(await config.loadAll()).toEqual({ settings, position });
expect(await config.loadAll()).toEqual({ settings: await config.loadSettings(), position });
Expand All @@ -21,7 +21,7 @@ test("", async () => {
expect(await config.loadAll()).toEqual({ settings: await config.loadSettings(), position });
});

test("", async () => {
test("parseSettings should handle various input cases", async () => {
expect(config.parseSettings({})).toEqual({});

expect(
Expand All @@ -33,7 +33,7 @@ test("", async () => {
normalDialogStyles: null,
movingDialogStyles: "",
hiddenDialogStyles: "{",
})
}),
).toEqual({
shortWordLength: 2,
empty: "",
Expand All @@ -43,7 +43,7 @@ test("", async () => {
});
});

test("", async () => {
test("parseSettings should handle initialPosition and window status save", async () => {
expect(config.parseSettings({})).toEqual({});

expect(config.parseSettings({ initialPosition: "right" })).toEqual({ initialPosition: "right" });
Expand All @@ -53,7 +53,7 @@ test("", async () => {
expect(config.parseSettings({ initialPosition: "keep" })).toEqual({ initialPosition: "right" });
});

test("", async () => {
test("savePosition should save and load position correctly", async () => {
global.chrome = chrome as any;

expect((await config.loadAll()).position).toEqual({});
Expand Down
Loading

0 comments on commit 0952d27

Please sign in to comment.