@apollo-elements/fast
Advanced tools
Comparing version 2.0.0 to 2.0.1-next.0
import { __decorate } from "tslib"; | ||
import { makeClient } from '@apollo-elements/test'; | ||
import * as C from '@apollo/client/core'; | ||
import { makeClient, nextNAsync } from '@apollo-elements/test'; | ||
import { fixture, expect } from '@open-wc/testing'; | ||
@@ -94,3 +95,3 @@ import { unsafeStatic, html as h } from 'lit/static-html.js'; | ||
}); | ||
beforeEach(() => spy(element.controller, 'refetch')); | ||
beforeEach(() => spy(C.ObservableQuery.prototype, 'reobserve')); | ||
beforeEach(() => { | ||
@@ -102,17 +103,15 @@ clock = useFakeTimers(); | ||
var _a, _b; | ||
(_b = (_a = element.controller.refetch).restore) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
(_b = (_a = C.ObservableQuery.prototype.reobserve).restore) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
}); | ||
describe('calling startPolling(1000)', function () { | ||
beforeEach(function startPolling() { element.startPolling(1000); }); | ||
beforeEach(() => { | ||
clock.tick(3500); | ||
}); | ||
beforeEach(() => nextNAsync(clock, 3)); | ||
it('refetches', function () { | ||
expect(element.controller.refetch).to.have.been.calledThrice; | ||
expect(C.ObservableQuery.prototype.reobserve).to.have.been.calledThrice; | ||
}); | ||
describe('then stopPolling', function () { | ||
beforeEach(function stopPolling() { element.stopPolling(); }); | ||
beforeEach(() => { clock.tick(3500); }); | ||
beforeEach(() => nextNAsync(clock, 5)); | ||
it('stops calling refetch', function () { | ||
expect(element.controller.refetch).to.have.been.calledThrice; | ||
expect(C.ObservableQuery.prototype.reobserve).to.have.been.calledThrice; | ||
}); | ||
@@ -119,0 +118,0 @@ }); |
{ | ||
"name": "@apollo-elements/fast", | ||
"version": "2.0.0", | ||
"version": "2.0.1-next.0", | ||
"description": "👩🚀🌛 FastElements for Apollo GraphQL 🚀👨🚀", | ||
@@ -71,4 +71,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"@apollo-elements/core": "^1.0.0", | ||
"@apollo-elements/mixins": "^4.0.0", | ||
"@apollo-elements/core": "^1.0.1-next.0", | ||
"@apollo-elements/mixins": "^4.0.1-next.0", | ||
"@microsoft/fast-element": "^1.4.0", | ||
@@ -75,0 +75,0 @@ "tslib": "^2.3.0" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
271875
4016
1