Skip to content
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
18 changes: 9 additions & 9 deletions e2e/examples/lumberjack-app-e2e/src/e2e/console-driver.cy.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { VERSION } from '@angular/core';

describe('Console log driver', () => {
function visit() {
cy.visit('/', {
onBeforeLoad(win): void {
cy.stub(win.console, 'error').as('consoleError');
cy.stub(win.console, 'info').as('consoleInfo');
},
});
}
function visit() {
cy.visit('/', {
onBeforeLoad(win): void {
cy.stub(win.console, 'error').as('consoleError');
cy.stub(win.console, 'info').as('consoleInfo');
},
});
}

describe('Console log driver', () => {
const expectedPayload = {
angularVersion: VERSION.major,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { spyDriverConfigToken } from './spy-driver-config.token';
export class SpyDriver<TPayload extends LumberjackLogPayload | void = void>
implements LumberjackLogDriver<TPayload>, jest.Mocked<LumberjackLogDriver>
{
static driverIdentifier = 'SpyDriver';
static readonly driverIdentifier = 'SpyDriver';

readonly config = inject(spyDriverConfigToken);
readonly logCritical = jest.fn();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe(LumberjackLogFactory.name, () => {
expect(new Date(log.createdAt)).toEqual(fakeNow);
});

it('timestamps the log with the current date and time', () => {
it('timestamps every log with the date and time of its creation', () => {
const firstLog = logFactory.createWarningLog(testMessage).build();
const fakeLater = new Date('2021-01-23T23:23:23Z');
fakeTime.setTime(fakeLater);
Expand Down
10 changes: 10 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ sonar.coverage.exclusions=tools/scripts/**,packages/internal/**,**/jest.config.t
# configure the files that should be ignored by duplication detection
sonar.cpd.exclusions=**/jest.config.ts,**/test.ts,packages/**/main.ts,**/eslint.config.mjs

# Issue exclusions
# S5914 ("assertion always succeeds") in the `*-api.spec.ts` public API surface
# tests. Those tests assert the *type* — `const value: SomeExport | undefined`
# fails to compile if the export is dropped — and the runtime assertion is only
# there to give the type annotation a test body. Rewriting them to satisfy the
# rule would delete the thing being tested.
sonar.issue.ignore.multicriteria=apiSurfaceAssertions
sonar.issue.ignore.multicriteria.apiSurfaceAssertions.ruleKey=typescript:S5914
sonar.issue.ignore.multicriteria.apiSurfaceAssertions.resourceKey=**/*-api.spec.ts

# Reports
# Test coverage reports
# paths (absolute or relative) to the files with LCOV data
Expand Down
6 changes: 2 additions & 4 deletions tools/scripts/configure-sonar-report-paths.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,5 @@ function listLintReports() {
return listFilePaths('reports/**/lint/report.json');
}

(async () => {
await configureCoverageReportPaths();
await configureLintReportPaths();
})();
await configureCoverageReportPaths();
await configureLintReportPaths();
2 changes: 1 addition & 1 deletion tools/scripts/delete-path-alias.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readFileSync, writeFileSync } from 'fs';
import { readFileSync, writeFileSync } from 'node:fs';

function deletePathAlias(alias) {
const encoding = 'utf8';
Expand Down
Loading