sberdevices/plasma

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

Open

#467 opened on Jun 28, 2021

 (1 comment) (0 reactions) (0 assignees)TypeScript (19 forks)auto 404
Good first issueTests

Repository metrics

Stars
 (63 stars)
PR merge metrics
 (PR metrics pending)

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)

Contributor guide