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

#15009 bug with not contains #16853

Open
wants to merge 7 commits into
base: v18-prod
Choose a base branch
from
Open
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
24 changes: 24 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Jest",
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
"args": [
"packages/primeng/src/table/table.service.spec.ts",
"--runInBand"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
},
"angular.enable-strict-mode-prompt": false
}
2 changes: 1 addition & 1 deletion apps/showcase/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": false
"sourceMap": true
}
},
"defaultConfiguration": "production"
Expand Down
6 changes: 3 additions & 3 deletions apps/showcase/doc/table/filteradvanceddoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Table } from 'primeng/table';
<p-inputicon>
<i class="pi pi-search"></i>
</p-inputicon>
<input pInputText type="text" (input)="dt2.filterGlobal($event.target.value, 'contains')" placeholder="Search keyword" />
<input pInputText type="text" (input)="dt1.filterGlobal($event.target.value, 'contains')" placeholder="Search keyword" />
</p-iconfield>
</div>
</ng-template>
Expand Down Expand Up @@ -227,7 +227,7 @@ export class FilterAdvancedDoc {
<p-inputicon>
<i class="pi pi-search"></i>
</p-inputicon>
<input pInputText type="text" (input)="dt2.filterGlobal($event.target.value, 'contains')" placeholder="Search keyword" />
<input pInputText type="text" (input)="dt1.filterGlobal($event.target.value, 'contains')" placeholder="Search keyword" />
</p-iconfield>
</div>
</ng-template>
Expand Down Expand Up @@ -369,7 +369,7 @@ export class FilterAdvancedDoc {
<p-inputicon>
<i class="pi pi-search"></i>
</p-inputicon>
<input pInputText type="text" (input)="dt2.filterGlobal($event.target.value, 'contains')" placeholder="Search keyword" />
<input pInputText type="text" (input)="dt1.filterGlobal($event.target.value, 'contains')" placeholder="Search keyword" />
</p-iconfield>
</div>
</ng-template>
Expand Down
35 changes: 35 additions & 0 deletions basic-test.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* This is a basic test file is to test
* if your current test tooling works in general.
*/
import { Component } from '@angular/core';
import { TestBed } from '@angular/core/testing';

interface MyInterface {
name: string;
}

@Component({
template: ``
})
class DummyComponent {}

function p1(): MyInterface {
return { name: 'p1' };
}

describe('test', () => {
it('p1', () => {
expect(p1().name).toBe('p1');
});

it('should create dummy component', () => {
TestBed.configureTestingModule({
declarations: [DummyComponent]
}).compileComponents();

const fixture = TestBed.createComponent(DummyComponent);
const component = fixture.componentInstance;
expect(component).toBeTruthy();
});
});
13 changes: 13 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { Config } from 'jest';

const config: Config = {
collectCoverage: true,
coverageReporters: ['html'],
preset: 'jest-preset-angular',
moduleNameMapper: {
'^primeng/(.*)': '<rootDir>/packages/primeng/src/$1/public_api'
},
setupFilesAfterEnv: ['<rootDir>/setup-jest.ts']
};

export default config;
150 changes: 150 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
"format:check": "prettier --check \"**/*.{js,mjs,ts,mts,d.ts,html}\"",
"lint": "eslint --ext \".js,.mjs,.ts,.mts\" --ignore-path .gitignore . --cache",
"lint:fix": "eslint --fix --ext \".js,.mjs,.ts,.mts\" --ignore-path .gitignore .",
"test:unit": "pnpm --filter primeng test:unit"
"test:unit": "pnpm --filter primeng test:unit",
"test:jest": "jest",
"test:confirm-jest": "jest basic-test.spec.ts"
},
"devDependencies": {
"@angular-devkit/build-angular": "catalog:angular18",
Expand Down Expand Up @@ -60,10 +62,13 @@
"fs-extra": "^11.2.0",
"glob": "^10.4.2",
"husky": "^9.1.6",
"jest": "^29.7.0",
"jest-preset-angular": "^14.3.1",
"lint-staged": "^12.0.0",
"ng-packagr": "catalog:angular18",
"pnpm": "^9.6.0",
"prettier": "^3.0.0",
"ts-jest": "^29.2.5",
"tsup": "^8.1.0",
"typescript": "5.4.5"
},
Expand All @@ -72,6 +77,8 @@
},
"packageManager": "[email protected]",
"lint-staged": {
"**/*.{js,mjs,ts,mts,d.ts,html}": ["prettier --write"]
"**/*.{js,mjs,ts,mts,d.ts,html}": [
"prettier --write"
]
}
}
Loading