https://drive.google.com/open?id=1IayEFjUReATiuJI8CD6hBQRPGR7iIrFZ
// check file
app.component.spec.tsliqiang372
- Node 8+
- NPM or yarn
- Git
- Safari, Chrome, Firefox
cd topcoder-jest-test
git checkout issue-22
npm install
npm run testnpm run test:jestChrome, Safari, Firefox
| Browser | Result |
|---|---|
| Chrome 72.0.3626 (Mac OS X 10.14.2) | success |
| Safari 11.1.0 (Mac OS X 10.14.2) | success |
| Firefox 65.0.0 (Mac OS X 10.14.2) | success |
FAIL src/app/app.component.spec.ts
AppComponent
✕ should create the app (91ms)
● AppComponent › should create the app
AssertionError: expected false to equal true
22 | link.as = 'script';
23 | expect(link.hasAttribute('rel')).to.equal(true);
> 24 | expect(link.hasAttribute('as')).to.equal(true);
| ^
25 | });
26 | });
27 |
at src/app/app.component.spec.ts:24:40
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 2.562sexpect(link.hasAttribute('as')).to.equal(true);
Link tag in JSDOM is not implemented appropriately, as attribute is ignored
issue: jsdom/jsdom#2471