sberdevices / plasma

💠 Дизайн-Система для создания навыков семейства Виртуальных Ассистентов "Салют"
https://plasma.sberdevices.ru
Other
64 stars 20 forks source link

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

Open Yeti-or opened 3 years ago

Yeti-or commented 3 years ago

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)
Yeti-or commented 3 years ago

Не забыть посмотреть на удаленный тест из https://github.com/sberdevices/plasma/pull/466