Skip to content

Instantly share code, notes, and snippets.

Avatar

Cyrille Tuzi cyrilletuzi

View GitHub Profile
View spec.ts
describe('Account', () => {
it('should register successfully', () => {
const email = `test_${Date.now()}@example.com`;
const password = 'test';
cy.visit('/account/register');
cy.get('input[type="email"]').type(email);
View app.e2e-spec.ts
import { browser, $, ExpectedConditions } from 'protractor';
describe('Account', () => {
it('should register successfully', async () => {
const email = `test_${Date.now()}@example.com`;
const password = 'test';
await browser.get('/account/register');
View .eslintrc.json
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:cypress/recommended"
]
}
View .eslintrc.json
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
View settings.json
{
"angular.experimental-ivy": true
}
View params.ts
function myMethod(required, optional = 'default') {}
myMethod(); // Error
View tsconfig.json
{
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictTemplates": true,
"strictInputAccessModifiers": true
}
}
View demo.ts
function filter<T>(list: T[]): T[] {}
View demo.ts
getFromClientSideStorage(key: string): unknown {}
View .eslintrc.json
{
"rules": {
"@typescript-eslint/explicit-function-return-type": "error"
}
}