Skip to content

Instantly share code, notes, and snippets.

View henryruhs's full-sized avatar

Henry Ruhs henryruhs

View GitHub Profile
import environment from '../../../environments/environment';
export default class ExampleService
{
read(id)
{
const url = new URL(environment.apiRoutes.example + '/' + id, environment.apiUrl);
return fetch(url.toString());
}
import { environmentHelper } from '../../../src/environments/environment';
const environment = environmentHelper(Cypress.env('APP_ENV'));
Cypress.Commands.add('pingApiUrl', () =>
{
cy.request('HEAD', environment.apiUrl);
});
Cypress.Commands.add('insertTestData', () =>