Add new test
And rename test file.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { expect } from 'chai';
|
||||
import { parseResponse } from '../../../remote-queries/run-remote-query';
|
||||
|
||||
describe('run-remote-queries', () => {
|
||||
describe('run-remote-query', () => {
|
||||
describe('parseResponse', () => {
|
||||
it('should parse a successful response', () => {
|
||||
const result = parseResponse('org', 'name', {
|
||||
@@ -18,6 +18,17 @@ describe('run-remote-queries', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('should parse a response with no repositories queried', () => {
|
||||
const result = parseResponse('org', 'name', {
|
||||
workflow_run_id: 123,
|
||||
});
|
||||
|
||||
expect(result.popupMessage).to.equal('Successfully scheduled runs. [Click here to see the progress](https://github.com/org/name/actions/runs/123).');
|
||||
expect(result.logMessage).to.equal(
|
||||
'Successfully scheduled runs. See https://github.com/org/name/actions/runs/123.'
|
||||
);
|
||||
});
|
||||
|
||||
it('should parse a response with invalid repos', () => {
|
||||
const result = parseResponse('org', 'name', {
|
||||
workflow_run_id: 123,
|
||||
Reference in New Issue
Block a user