sberdevices/plasma

plasma-tokens-utils: Расскипать тесты

Ouverte

#467 ouverte le 28 juin 2021

 (1 commentaire) (0 réaction) (0 personne assignée)TypeScript (19 forks)auto 404
Good first issueTests

Métriques du dépôt

Stars
 (63 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

FAIL src/generation.test.ts

  ● Test suite failed to run

    src/generation.test.ts:173:53 - error TS2345: Argument of type '{ white: string; whitePrimary: string; whiteSecondary: string; whiteTertiary: string; black: string; blackPrimary: string; blackSecondary: string; blackTertiary: string; transparent: string; ... 23 more ...; buttonFocused: string; }' is not assignable to parameter of type 'Record<"text" | "primary" | "secondary" | "tertiary" | "paragraph" | "inverse" | "background" | "backgroundPrimary" | "backgroundSecondary" | "backgroundTertiary" | "accent" | "success" | ... 22 more ... | "voicePhraseGradient", string>'.
      Type '{ white: string; whitePrimary: string; whiteSecondary: string; whiteTertiary: string; black: string; blackPrimary: string; blackSecondary: string; blackTertiary: string; transparent: string; ... 23 more ...; buttonFocused: string; }' is missing the following properties from type 'Record<"text" | "primary" | "secondary" | "tertiary" | "paragraph" | "inverse" | "background" | "backgroundPrimary" | "backgroundSecondary" | "backgroundTertiary" | "accent" | "success" | ... 22 more ... | "voicePhraseGradient", string>': paragraph, inverse, success, gradientDevice, and 7 more.

    173     const generated = generateThemeJSON(typoSystem, light, { light });
                                                            ~~~~~

FAIL src/mappers.test.ts

  ● mapDesignToBaseColors › Should return base colors object

    TypeError: Cannot read property 'color' of undefined

      44 |
      45 |     buttonClear: {
    > 46 |         value: humanizeColor(ds.colors.button_black.color),
         |                                                     ^
      47 |         comment: 'Второстепенная прозрачная',
      48 |     },
      49 |

      at Object.mapDesignToBaseColors (src/mappers.ts:46:53)
      at Object.<anonymous> (src/mappers.test.ts:40:16)

Guide contributeur