Skip to content

Commit

Permalink
Tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec committed Oct 23, 2023
1 parent ef99c0c commit c0975ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export enum ReviewEntriesWordField {
Pronunciations = "audio",
Note = "noteText",
Flag = "flag",
History = "historyLength",
}

export class ReviewEntriesWord {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,25 +92,19 @@ const SENSES: Partial<ReviewEntriesSense>[] = [
},
];

const WORD_0 = {
const WORD0 = {
senses: [SENSES[0]],
flag: { ...newFlag(), active: true },
} as ReviewEntriesWord;
const WORD_1 = {
senses: [SENSES[1]],
flag: newFlag("Z is for Zebra"),
} as ReviewEntriesWord;
const WORD_2 = {
senses: [SENSES[2]],
flag: newFlag("A is for Aardvark"),
} as ReviewEntriesWord;
const WORD_3 = { senses: [SENSES[3]], flag: newFlag() } as ReviewEntriesWord;

const SORT_BY_DEFINIS = [WORD_1, WORD_3, WORD_0, WORD_2];
const SORT_BY_GLOSSES = [WORD_3, WORD_1, WORD_2, WORD_0];
const SORT_BY_PARTOFS = [WORD_1, WORD_2, WORD_3, WORD_0];
const SORT_BY_DOMAINS = [WORD_2, WORD_0, WORD_3, WORD_1];
const SORT_BY_FLAGIES = [WORD_0, WORD_2, WORD_1, WORD_3];
const WORD1 = { senses: [SENSES[1]], flag: newFlag("Zz") } as ReviewEntriesWord;
const WORD2 = { senses: [SENSES[2]], flag: newFlag("Aa") } as ReviewEntriesWord;
const WORD3 = { senses: [SENSES[3]], flag: newFlag() } as ReviewEntriesWord;

const SORT_BY_DEFINIS = [WORD1, WORD3, WORD0, WORD2];
const SORT_BY_GLOSSES = [WORD3, WORD1, WORD2, WORD0];
const SORT_BY_PARTOFS = [WORD1, WORD2, WORD3, WORD0];
const SORT_BY_DOMAINS = [WORD2, WORD0, WORD3, WORD1];
const SORT_BY_FLAGIES = [WORD0, WORD2, WORD1, WORD3];

describe("CellColumns filter and sort functions", () => {
describe("Sense column", () => {
Expand Down

0 comments on commit c0975ea

Please sign in to comment.