sberdevices/plasma

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

Aperta

#467 aperta il 28 giu 2021

 (1 commento) (0 reazioni) (0 assegnatari)TypeScript (19 fork)auto 404
Good first issueTests

Metriche repository

Star
 (63 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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)

Guida contributor