Skip to content

Commit

Permalink
fix(spectator): fix queryall return type
Browse files Browse the repository at this point in the history
  • Loading branch information
NetanelBasal committed Apr 4, 2018
1 parent 7753a8b commit 8456943
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/app/zippy/zippy.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ describe("ZippyComponent", () => {
host = createHost(`<zippy title="Zippy title">Zippy content</zippy>`);
const a = document.querySelectorAll(".fiv");
const b = host.query(".color", true);
console.log(b);

expect(host.query(".zippy")).toHaveAttr({ attr: "id", val: "zippy" });
});
Expand Down
4 changes: 2 additions & 2 deletions src/lib/src/internals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export class Spectator<C> {
* @returns {any}
*/
queryAll(selector: string, debugElement: true): DebugElement[];
queryAll(selector: string, debugElement?: false): Element;
queryAll(selector: string, debugElement = false): Element | DebugElement[] {
queryAll(selector: string, debugElement?: false): NodeListOf<Element>;
queryAll(selector: string, debugElement = false): NodeListOf<Element> | DebugElement[] {
if (debugElement) {
return this.debugElement.queryAll(By.css(selector));
}
Expand Down

0 comments on commit 8456943

Please sign in to comment.