Files
nebula.js/commands/serve/web/utils/__tests__/detectDefaultConnectionStep.test.js
Ahmad Mirzaei 6454769e5b test: rename test files and update ci pipeline (#1009)
* test: deprecate `aw` and rename all jest unit tests from `.inspect` to `.test`

* test: rename jest unit tests and update ci
2022-11-18 13:26:15 +01:00

25 lines
788 B
JavaScript

import { detectDefaultConnectionStep } from '../detectDefaultConnectionStep';
describe('detectDefaultConnectionStep()', () => {
let info = {};
test('should return 0 if there was no info', () => {
expect(detectDefaultConnectionStep(null)).toBe(0);
});
test('should return 0 if none of integration id or client id was provided', () => {
info = {};
expect(detectDefaultConnectionStep(info)).toBe(0);
});
test('should return 1 if there was `isWebIntegrationIdProvided`', () => {
info = { isWebIntegrationIdProvided: true };
expect(detectDefaultConnectionStep(info)).toBe(1);
});
test('should return 2 if there was `isClientIdProvided`', () => {
info = { isClientIdProvided: true };
expect(detectDefaultConnectionStep(info)).toBe(2);
});
});