Skip to content

Commit

Permalink
Merge pull request #56 from kreuzerk/feature/fixTest
Browse files Browse the repository at this point in the history
chore: 🤖 fix failing test
  • Loading branch information
nivekcode authored Nov 19, 2020
2 parents 965b6f8 + f8dbaf0 commit 0f0a1f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"format:check": "prettier --list-different 'projects/**/*.ts'",
"format:write": "prettier --write 'projects/**/*.ts'",
"import-conductor": "import-conductor --source 'projects/**/*.ts'",
"test": "ng test",
"test": "npm run test:lib",
"test:coverage": "ng test --code-coverage --watch=false",
"test:lib": "jest --config ./projects/ng-sortgrid/jest.config.js",
"test:lib:coverage": "jest --config ./projects/ng-sortgrid/jest.config.js --coverage",
Expand Down Expand Up @@ -74,7 +74,6 @@
},
"lint-staged": {
"{src,__mocks__,bin}/**/*.ts": [
"import-conductor --staged",
"prettier --write",
"git add"
]
Expand Down
6 changes: 1 addition & 5 deletions projects/ng-sortgrid/src/lib/ngsg-item.directive.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { NgsgElementsHelper } from './helpers/element/ngsg-elements.helper';
import { NgsgSelectionService } from './mutliselect/ngsg-selection.service';
import { NgsgItemDirective } from './ngsg-item.directive';
import { NgsgEventsService } from './shared/ngsg-events.service';
import { NgsgOrderChange } from './shared/ngsg-order-change.model';
import { NgsgReflectService } from './sort/reflection/ngsg-reflect.service';
import { NgsgSortService } from './sort/sort/ngsg-sort.service';
import { NgsgStoreService } from './store/ngsg-store.service';

describe('NgsgItemDirective', () => {
let sut: NgsgItemDirective;
Expand Down Expand Up @@ -101,7 +97,7 @@ describe('NgsgItemDirective', () => {
});

it('must call event preventDefault', () => {
const preventDefaultSpy = createSpy();
const preventDefaultSpy = jest.fn();
const event = { preventDefault: preventDefaultSpy };
sut.dragOver(event);
expect(preventDefaultSpy).toHaveBeenCalled();
Expand Down

0 comments on commit 0f0a1f9

Please sign in to comment.