This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph { | |
adjacencyList: Map<number, number[]>; | |
constructor() { | |
this.adjacencyList = new Map<number, number[]>(); | |
} | |
addVertex(vertex: number) { | |
if (!this.adjacencyList.has(vertex)) { | |
this.adjacencyList.set(vertex, []); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Queue<T> { | |
queue: T[]; | |
constructor() { | |
this.queue = []; | |
} | |
enqueue(value: T) { | |
this.queue.push(value); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Stack<T> { | |
stack: T[]; | |
constructor() { | |
this.stack = []; | |
} | |
push(value: T) { | |
this.stack.push(value); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ListNode<T> { | |
value: T; | |
next: ListNode<T> | null; | |
constructor(value: T) { | |
this.value = value; | |
this.next = null; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const array: number[] = [1, 2, 3, 4, 5]; | |
console.log(array); // Output: [1, 2, 3, 4, 5] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BEGIN WP Rocket v3.12.3.2 | |
# Use UTF-8 encoding for anything served text/plain or text/html | |
AddDefaultCharset UTF-8 | |
# Force UTF-8 for a number of file formats | |
<IfModule mod_mime.c> | |
AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml | |
</IfModule> | |
# FileETag None is not enough for every server. | |
<IfModule mod_headers.c> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source https://github.com/Behat/fr-docs.behat.org/blob/master/guides/1.gherkin.rst | |
Fonctionnalité: Une description de ce qui est attendu | |
Afin de réaliser une action métier (domaine fonctionnel) | |
En tant qu'acteur explicite du domaine fonctionnel | |
Je dois tirer un bénéfice de cette fonctionnalité | |
Scénario: Une description du scénario | |
Etant donné que [un contexte] | |
Et [plus d'informations sur le contexte] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from https://behat.org/en/latest/user_guide/gherkin.html | |
Feature: Some terse yet descriptive text of what is desired | |
In order to realize a named business value | |
As an explicit system actor | |
I want to gain some beneficial outcome which furthers the goal | |
Additional text... | |
Scenario: Some determinable business situation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Authentication | |
Scenario: User is login in | |
When the user is login in with valid credentials "[email protected]" and "test1234" | |
Then the user should have a valid uuid token | |
Scenario: User is login in (with bad info) | |
# todo | |
Scenario: User is login in (with expired password) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Before, Then, When } from '@cucumber/cucumber'; | |
import { TestingModule } from '@nestjs/testing'; | |
import { getTestingModule } from '../../apps/core/src/shared/in-memory-orm.module'; | |
import FixturesService from '../../apps/fixtures/src/fixtures.service'; | |
import { AuthModule } from '../../apps/core/src/authentication/auth.module'; | |
import { AuthService } from '../../apps/core/src/authentication/auth.service'; | |
import { PassportModule } from '@nestjs/passport'; | |
import { JwtModule } from '@nestjs/jwt'; | |
import { PermissionsModule } from '../../apps/core/src/authentication/permissions/permissions.module'; |