Skip to content

Commit f9385db

Browse files
committed
Fix the remaining tests
1 parent 4ca5730 commit f9385db

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

glean/tests/core/glean.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ describe("Glean", function() {
441441
//
442442
// This disables the uploading and deletion of pings from the pings database,
443443
// this allows us to query the database to check that our pings are as expected.
444-
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve());
444+
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve([]));
445445

446446
const custom = new PingType({
447447
name: "custom",

glean/tests/core/metrics/labeled.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe("LabeledMetric", function() {
2222
beforeEach(async function() {
2323
await Glean.testResetGlean(testAppId);
2424
// Disable ping uploading for it not to interfere with this tests.
25-
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve());
25+
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve([]));
2626
});
2727

2828
afterEach(function () {

glean/tests/core/pings/index.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe("PingType", function() {
3636

3737
it("collects and stores ping on submit", async function () {
3838
// Disable ping uploading for it not to interfere with this tests.
39-
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve());
39+
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve([]));
4040

4141
const ping = new PingType({
4242
name: "custom",
@@ -59,7 +59,7 @@ describe("PingType", function() {
5959

6060
it("empty pings with send if empty flag are submitted", async function () {
6161
// Disable ping uploading for it not to interfere with this tests.
62-
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve());
62+
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve([]));
6363

6464
const ping1 = new PingType({
6565
name: "ping1",

glean/tests/core/pings/maker.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ describe("PingMaker", function() {
141141

142142
it("collect and store triggers the AfterPingCollection and deals with possible result correctly", async function () {
143143
// Disable ping uploading for it not to interfere with this tests.
144-
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve());
144+
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve([]));
145145

146146
await Glean.testResetGlean(testAppId, true, { plugins: [ new MockPlugin() ]});
147147
const ping = new PingType({
@@ -162,7 +162,7 @@ describe("PingMaker", function() {
162162

163163
it("ping payload is logged before it is modified by a plugin", async function () {
164164
// Disable ping uploading for it not to interfere with this tests.
165-
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve());
165+
sandbox.stub(Glean["pingUploader"], "triggerUpload").callsFake(() => Promise.resolve([]));
166166

167167
await Glean.testResetGlean(testAppId, true, {
168168
debug: {

0 commit comments

Comments
 (0)