sberdevices/plasma

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

Aberta

#467 aberto em 28 de jun. de 2021

 (1 comentário) (0 reação) (0 responsável)TypeScript (19 forks)auto 404
Good first issueTests

Métricas do repositório

Stars
 (63 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

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)

Guia do colaborador