Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix incorrect usage in theming tests #25259

Merged
merged 1 commit into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ $mat-theme-ignore-duplication-warnings: true;

$theme: mat-light-theme((
color: (
primary: $mat-red,
accent: $mat-blue,
primary: mat-define-palette($mat-red),
accent: mat-define-palette($mat-blue),
),
density: -2,
));
Expand Down
24 changes: 12 additions & 12 deletions src/material/core/theming/tests/theming-api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ describe('theming api', () => {
transpile(`
$theme: mat-light-theme((
color: (
primary: $mat-red,
accent: $mat-red,
primary: mat-define-palette($mat-red),
accent: mat-define-palette($mat-red),
)
));

Expand All @@ -65,14 +65,14 @@ describe('theming api', () => {
transpile(`
$theme: mat-light-theme((
color: (
primary: $mat-red,
accent: $mat-red,
primary: mat-define-palette($mat-red),
accent: mat-define-palette($mat-red),
)
));
$theme2: mat-light-theme((
color: (
primary: $mat-red,
accent: $mat-blue,
primary: mat-define-palette($mat-red),
accent: mat-define-palette($mat-blue),
)
));

Expand Down Expand Up @@ -255,14 +255,14 @@ describe('theming api', () => {
it('should be possible to specify palettes by keyword', () => {
transpile(`
$light-theme: mat-light-theme(
$primary: $mat-red,
$accent: $mat-blue,
$warn: $mat-red,
$primary: mat-define-palette($mat-red),
$accent: mat-define-palette($mat-blue),
$warn: mat-define-palette($mat-red),
);
$dark-theme: mat-dark-theme(
$primary: $mat-red,
$accent: $mat-blue,
$warn: $mat-red,
$primary: mat-define-palette($mat-red),
$accent: mat-define-palette($mat-blue),
$warn: mat-define-palette($mat-red),
);
`);
});
Expand Down