Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kubk committed Nov 17, 2023
1 parent 461c7d8 commit c32ab35
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/screens/deck-list/my-deck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import React from "react";
import { motion } from "framer-motion";
import { whileTap } from "../../ui/animations.ts";
import { screenStore } from "../../store/screen-store.ts";
import {
deckListStore,
DeckWithCardsWithReviewType,
} from "../../store/deck-list-store.ts";
import { DeckWithCardsWithReviewType } from "../../store/deck-list-store.ts";

type Props = { deck: DeckWithCardsWithReviewType };

Expand Down
2 changes: 0 additions & 2 deletions src/screens/deck-review/deck-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { Button } from "../../ui/button.tsx";
import { ShareDeckButton } from "./share-deck-button.tsx";
import { useBackButton } from "../../lib/telegram/use-back-button.tsx";
import { useMainButton } from "../../lib/telegram/use-main-button.tsx";
import { trimEnd } from "../../lib/string/trim.ts";
import WebApp from "@twa-dev/sdk";

export const DeckPreview = observer(() => {
const reviewStore = useReviewStore();
Expand Down
13 changes: 10 additions & 3 deletions src/store/review-store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ describe("card form store", () => {

it("basic", () => {
const reviewStore = new ReviewStore();
reviewStore.startDeckReview(deckCardsMock);
reviewStore.startDeckReview(deckCardsMock, '');
expect(reviewStore.isFinished).toBeFalsy();
expect(reviewStore.cardsToReview).toMatchInlineSnapshot(`
[
CardFormStore {
"back": "Время",
"deckName": "",
"example": null,
"front": "time",
"id": 3,
Expand All @@ -66,6 +67,7 @@ describe("card form store", () => {
},
CardFormStore {
"back": "Год",
"deckName": "",
"example": null,
"front": "year",
"id": 4,
Expand All @@ -74,6 +76,7 @@ describe("card form store", () => {
},
CardFormStore {
"back": "Дорога",
"deckName": "",
"example": null,
"front": "way",
"id": 5,
Expand All @@ -92,6 +95,7 @@ describe("card form store", () => {
[
CardFormStore {
"back": "Год",
"deckName": "",
"example": null,
"front": "year",
"id": 4,
Expand All @@ -100,6 +104,7 @@ describe("card form store", () => {
},
CardFormStore {
"back": "Дорога",
"deckName": "",
"example": null,
"front": "way",
"id": 5,
Expand All @@ -118,6 +123,7 @@ describe("card form store", () => {
[
CardFormStore {
"back": "Дорога",
"deckName": "",
"example": null,
"front": "way",
"id": 5,
Expand All @@ -126,6 +132,7 @@ describe("card form store", () => {
},
CardFormStore {
"back": "Год",
"deckName": "",
"example": null,
"front": "year",
"id": 4,
Expand All @@ -150,7 +157,7 @@ describe("card form store", () => {

it("current next", () => {
const reviewStore = new ReviewStore();
reviewStore.startDeckReview(deckCardsMock);
reviewStore.startDeckReview(deckCardsMock, '');
expect(reviewStore.isFinished).toBeFalsy();

expect(reviewStore.currentCard?.id).toEqual(3);
Expand Down Expand Up @@ -189,7 +196,7 @@ describe("card form store", () => {

it("hit wrong many times", () => {
const reviewStore = new ReviewStore();
reviewStore.startDeckReview(deckCardsMock);
reviewStore.startDeckReview(deckCardsMock, '');
expect(reviewStore.isFinished).toBeFalsy();

reviewStore.open();
Expand Down

0 comments on commit c32ab35

Please sign in to comment.