Skip to content

Commit

Permalink
blah blah
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao committed Mar 23, 2022
1 parent 43587f6 commit 784f669
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class PublisherERS extends PublisherBase<PublisherERSConfig> {
const artifacts = makeResult.artifacts.filter((artifactPath) => path.basename(artifactPath).toLowerCase() !== 'releases');

const existingVersion = versions.find((version) => {
version.name === packageJSON.version && (!version.flavor || version.flavor === flavor);
return version.name === packageJSON.version && (!version.flavor || version.flavor === flavor);
});

let channel = 'stable';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ForgeConfig, ForgeMakeResult } from '@electron-forge/shared-types';
import fetchMock from 'fetch-mock';
import proxyquire from 'proxyquire';

describe('PublisherERS', () => {
describe.only('PublisherERS', () => {
let fetch: typeof fetchMock;

beforeEach(() => {
Expand All @@ -20,7 +20,7 @@ describe('PublisherERS', () => {
// mock login
fetch.postOnce('path:/api/auth/login', { body: { token }, status: 200 });
// mock fetch all existing versions
fetch.getOnce('path:/api/version', { body: [{ name: '2.0.0', assets: [] }], status: 200 });
fetch.getOnce('path:/api/version', { body: [{ name: '2.0.0', assets: [], flavor: 'default' }], status: 200 });
// mock creating a new version
fetch.postOnce('path:/api/version', { status: 200 });
// mock asset upload
Expand Down Expand Up @@ -115,7 +115,7 @@ describe('PublisherERS', () => {
// mock login
fetch.postOnce('path:/api/auth/login', { body: { token }, status: 200 });
// mock fetch all existing versions
fetch.getOnce('path:/api/version', { body: [{ name: '2.0.0', assets: [{ name: 'existing-artifact' }] }], status: 200 });
fetch.getOnce('path:/api/version', { body: [{ name: '2.0.0', assets: [{ name: 'existing-artifact' }], flavor: 'default' }], status: 200 });

const PublisherERS = proxyquire.noCallThru().load('../src/PublisherERS', {
'node-fetch': fetch,
Expand Down

0 comments on commit 784f669

Please sign in to comment.