oa414
provided in gitlab issue.
- Node 8+
- NPM or yarn
- Git
- Safari, Chrome, Firefox
cd YOUR_CODE_DIR
git checkout master
npm install # or 'yarn' if your prefer
ng testchange the line in angular.json:
"projects": {
...
...
...
"architect": {
...
"test": {
// repleace this line
"builder": "@angular-devkit/build-angular:karma"
// whith this:
"builder": "@angular-builders/jest:run"then run test:
ng testChrome, Safari, Firefox
| Browser | Result |
|---|---|
| Chrome 72.0.3626 (Mac OS X 10.13.4) | success |
| Safari 11.1.0 (Mac OS X 10.13.4) | success |
| Firefox 65.0.0 (Mac OS X 10.13.0) | success |
✕ should get correct offsetLeft value (103ms)
● AppComponent › should get correct offsetLeft value
AssertionError: expected 0 to be at least 1
25 | it('should get correct offsetLeft value', () => {
26 | const long = fixture.nativeElement.querySelector('#long');
> 27 | expect(long.offsetLeft).to.be.at.least(1);
| ^
28 | });
29 |
30 | });Test case dom is from: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft
JSDOM doesn't implement offsetTop & offsetLeft & offsetBottom & offsetRight