Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
e4b0ae5
Squashed 'frontend/' content from commit ecb2f67
lucashnss Dec 17, 2024
6565bf1
Merge commit 'e4b0ae5d86fb533dec9515be6224b2ffb591567b' as 'frontend'
lucashnss Dec 17, 2024
066f435
Squashed 'backend/' content from commit f8aeda3
lucashnss Dec 17, 2024
8c727b4
Merge commit '066f4355086f65df08359432b7d3cb90d5a7da27' as 'backend'
lucashnss Dec 17, 2024
0eeef4a
feat: create base repository
lucashnss Dec 17, 2024
10ecf98
feat: creation of the <Exibir_historico_de_videos_series_assistidos a…
Dec 19, 2024
08fe38c
feat: creation of the recomendations feature
ykarocin Dec 19, 2024
39426cf
Primeira alteração provisória referente ao roteiro de gerenc. de conf.
ykarocin Dec 19, 2024
c0ca249
Alterações toys para exemplo do roteiro
ykarocin Dec 19, 2024
44c241e
Adding scenario: Exibir recomendações para um usuário sem histórico d…
ykarocin Dec 19, 2024
ca7857d
Adding feature Recomendações com base nas curtidas and one scenario v…
ykarocin Dec 19, 2024
a560238
Adição da feature de curtida e de um cenário de executar curtida
ykarocin Dec 19, 2024
2f25d80
Adding scenario Clicar novamente no botão de curtida
ykarocin Dec 19, 2024
687f7c5
feat: add scenarios for video visibility system and viewing history
Dec 19, 2024
d655e7d
feat: add scenario
Dec 19, 2024
3a7b299
feat: add scenario
Dec 19, 2024
bc7682b
feat: add scenario to 'Viewing History of Watched Series' feature
Dec 19, 2024
ef5cf55
feat: add scenario to 'Sistema de visibilidade de videos' feature
Dec 19, 2024
ba570b6
feat: creation of the user_register feature
lucashnss Dec 20, 2024
28dc7fd
fix: I need fix 2 scenario from Exibir_historico_de_videos_series_Ass…
Dec 20, 2024
5b859b0
feat: add scenarios successful user register and successfull registra…
lucashnss Dec 20, 2024
7803cd4
feat: add unsuccessful scenarios to user_register.feature
lucashnss Dec 20, 2024
26ab74a
feat: add register a user not registered in the system
lucashnss Dec 21, 2024
340336f
feat: change scenario to guide question
lucashnss Dec 21, 2024
063445a
Merge branch 'dev'
lucashnss Dec 21, 2024
0e79a26
fix: fix register a feature not registered in the system
lucashnss Dec 21, 2024
8b1fb27
fix: remove the guide question change
lucashnss Dec 21, 2024
d8ec01e
feat: commit 1 main
lucashnss Dec 21, 2024
d8228cf
feat: commit 2 main
lucashnss Dec 21, 2024
32ba3cc
feat: commit 3 main
lucashnss Dec 21, 2024
9c9eae1
feat: commit 4 main
lucashnss Dec 21, 2024
f52f6e8
fix: remove all questions changes
lucashnss Dec 21, 2024
3608049
fix: remove all questions changes in main
lucashnss Dec 21, 2024
dca0bc9
Merge branch 'dev'
lucashnss Dec 21, 2024
6021a4c
implementação do back-end e testes
Feb 11, 2025
e0f5242
Merge branch 'main' of https://github.com/ykarocin/ess-base-project-c…
ykarocin Feb 15, 2025
2e76f3d
Adicionando as features de GUI e de serviço de curtida, recomendação …
ykarocin Feb 15, 2025
f3b0fc9
Corrigindo cenário que estava sem given
ykarocin Feb 15, 2025
025547a
Adicionando given ao cenário de recomendação
ykarocin Feb 15, 2025
fe24cbe
test: add gui test scenarios
lucashnss Feb 16, 2025
8c3ea3c
test: add service test scenarios of user registration and maintenence
lucashnss Feb 16, 2025
6e4af40
test: add service test scenario of displaying all users registered
lucashnss Feb 16, 2025
bf87af0
Integração com SQLite3, atualização do HistoryItemEntity e ajuste de …
Feb 16, 2025
cdc94a5
Atualiza integração com SQLite3 e utiliza videoLink; ajustes nas enti…
lukasales Feb 16, 2025
fc43268
feat: add functional backend with user manegement (signup, login, upd…
lucashnss Feb 16, 2025
ae0821d
conversão de ts para js
lukasales Feb 16, 2025
926779a
Merge pull request #3 from lukasales/dev
lucashnss Feb 17, 2025
66cd14b
Feat: add Minha_Lista.feature to features
Pedr0Domingues Feb 17, 2025
aafa6e9
Create server.js
mbl-cin Feb 17, 2025
54a6cf8
feat: add Minha_Lista_Service.feature in service features
Pedr0Domingues Feb 17, 2025
d62b590
Create busca.feature
mbl-cin Feb 17, 2025
2a1b1c5
Create features
mbl-cin Feb 17, 2025
235ab5b
Create buscaSteps.js
mbl-cin Feb 17, 2025
05ff7cf
Create searchRoutes.js
mbl-cin Feb 17, 2025
b61abec
Create cucumber.js
mbl-cin Feb 17, 2025
8d3c207
Create package.json
mbl-cin Feb 17, 2025
9f1d6bc
Update searchRoutes.js
mbl-cin Feb 17, 2025
09facbc
Update busca.feature
mbl-cin Feb 17, 2025
1bb7554
Update buscaSteps.js
mbl-cin Feb 17, 2025
866f992
Update buscaSteps.js
mbl-cin Feb 17, 2025
84313b7
feat: backend for minha lista feature
Pedr0Domingues Feb 17, 2025
abe6363
Update busca.feature
mbl-cin Feb 17, 2025
123def3
Update searchRoutes.js
mbl-cin Feb 17, 2025
d0a7370
Finalizando rebase
lucashnss Feb 17, 2025
1bdb66a
Merge pull request #4 from mbl-cin/dev
lucashnss Feb 17, 2025
57dc445
fix: remove sqlite, using again json
lucashnss Feb 17, 2025
19fc3de
Merge branch 'dev' of github.com:lucashnss/ess-base-project-cc-1 into…
lucashnss Feb 17, 2025
46ea3bf
Finalização dos cenários de serviços e das rotas para as features de …
ykarocin Feb 17, 2025
c3a5219
Merge pull request #6 from Pedr0Domingues/main
lucashnss Feb 17, 2025
0b9661f
Corrigindo método do cenário de serviço de curtida, trocando DELETE p…
ykarocin Feb 19, 2025
2b468f3
Feat: Adicionando a comunicação entre o front e as rotas da feature l…
ykarocin Mar 17, 2025
5a2b1af
feat: Adicionando teste de remoção de item da lista de curtida
ykarocin Mar 18, 2025
268c13d
feat: Adicionando comunicação entre front e back
ykarocin Mar 18, 2025
f44614b
Feat: Finalizando testes de serviço relacionados ao backend
ykarocin Mar 18, 2025
7f4dda9
Remove .git folder from backend
lukasales Mar 19, 2025
826c013
Merge upstream/main and resolve conflicts
lukasales Mar 20, 2025
068117a
feat(controllers): Adicionando "Controllers" para a lista de filmes
JoaoAntonioReis Mar 20, 2025
3c85b79
feat(routes): Adicionado "routes" da lista dos filmes
JoaoAntonioReis Mar 20, 2025
d93c6b5
Fix(index): Adicionando o index para criação do servidor
JoaoAntonioReis Mar 20, 2025
2ee1c4d
Resolvendo erros internos do backend
lukasales Mar 22, 2025
29a4ee4
Merge pull request #8 from lukasales/tests-improvements
lucashnss Mar 23, 2025
fac0a09
Merge pull request #9 from JoaoAntonioReis/main
lucashnss Mar 23, 2025
e6443e3
Fix: fixing package.json to run tests
Pedr0Domingues Mar 23, 2025
430655a
Merge pull request #10 from Pedr0Domingues/main
lucashnss Mar 23, 2025
2f1136f
Add(tela inicial): Adicionando as funções de tela incial e todos os a…
JoaoAntonioReis Mar 23, 2025
8a71bde
Add(tela incial)
JoaoAntonioReis Mar 23, 2025
43bed14
Feat: adding remove video from list feature
Pedr0Domingues Mar 23, 2025
907c072
Merge branch 'lucashnss:main' into main
Pedr0Domingues Mar 23, 2025
bb5cb86
Merge pull request #11 from Pedr0Domingues/main
lucashnss Mar 23, 2025
cbdcde6
Feat: Adicionando node_modules ao git ignore
ykarocin Mar 23, 2025
1f92456
feat: commit before merge
lucashnss Mar 23, 2025
2d367f9
merge
lucashnss Mar 23, 2025
e625c14
fix: fix token and dependencies
lucashnss Mar 23, 2025
2603c24
del: file not used
lucashnss Mar 23, 2025
a15a16d
Merge branch 'main' into dev
lucashnss Mar 23, 2025
4dd1a15
Merge pull request #12 from lucashnss/master
JoaoAntonioReis Mar 23, 2025
69e30df
merge index of jalr and lhns3 and remove index of sales
lucashnss Mar 23, 2025
fe2f508
delete unsued files
lucashnss Mar 23, 2025
6e4cb43
push before checkout
lucashnss Mar 23, 2025
421d126
Merge branch 'main' of github.com:lucashnss/ess-base-project-cc-1
lucashnss Mar 23, 2025
9faf280
Merge branch 'main' into dev
lucashnss Mar 23, 2025
b27f22c
Merge pull request #7 from lucashnss/dev
lucashnss Mar 23, 2025
9bdb8f0
Feat: PR do backend
ykarocin Mar 23, 2025
ff92caf
Merge pull request #4 from ykarocin/dev
ykarocin Mar 23, 2025
92ef14c
Merge pull request #13 from ykarocin/main
lucashnss Mar 23, 2025
2a2beeb
Feat: Lista de séries curtidas na GUI
ykarocin Mar 23, 2025
42c397d
feat: add components, Login and Registration pages
lucashnss Mar 24, 2025
d3a2b42
Update cinevideo.tsx
mbl-cin Mar 24, 2025
d2b6ad9
add(barra de busca): adição da feature de barra de busca funcionando.
JoaoAntonioReis Mar 24, 2025
4dd12fe
Merge pull request #17 from lucashnss/master
lucashnss Mar 24, 2025
7583919
Merge pull request #14 from ykarocin/main
lucashnss Mar 24, 2025
72094e6
feat: Add correctly login feature in the frontend, using backend routes
lucashnss Mar 24, 2025
7f1d255
Merge pull request #16 from lucashnss/dev
JoaoAntonioReis Mar 24, 2025
bdead08
feat: add requisitons file to handle with backend routes from the fro…
lucashnss Mar 24, 2025
42a2464
Merge branch 'dev' of github.com:lucashnss/ess-base-project-cc-1 into…
lucashnss Mar 24, 2025
558574d
fix: now Input component has all attributes necessary
lucashnss Mar 24, 2025
056274f
Merge branch 'main' into dev
lucashnss Mar 24, 2025
f6617f8
feat: add profile_information page
lucashnss Mar 24, 2025
041cb44
Merge pull request #18 from lucashnss/dev
JoaoAntonioReis Mar 24, 2025
d0da439
Feat: Implementando rotas do backend
ykarocin Mar 24, 2025
278df83
Fix: Adaptando para facilitar a implementação das rotas
ykarocin Mar 24, 2025
d5cba41
Fix(voltar): o botao de voltar agora retorna para tela principal
JoaoAntonioReis Mar 24, 2025
c95929c
Fix: Resolvendo conflitos de merge
ykarocin Mar 24, 2025
d7131aa
Merge pull request #19 from ykarocin/main
lucashnss Mar 24, 2025
9bc6589
Merge branch 'main' into master
lucashnss Mar 24, 2025
a5de365
Merge pull request #20 from lucashnss/master
lucashnss Mar 24, 2025
616e2ef
Fix: Corrigindo cenário de curtida
ykarocin Mar 24, 2025
ea0cf8f
Merge branch 'main' of https://github.com/ykarocin/ess-base-project-cc-1
ykarocin Mar 24, 2025
e02b305
fix: successfully login
lucashnss Mar 24, 2025
81f721a
Fix: voltar para tela incial do filtro de genero
JoaoAntonioReis Mar 24, 2025
1a1912d
Merge branch 'master' of https://github.com/lucashnss/ess-base-projec…
JoaoAntonioReis Mar 24, 2025
3232b2d
fix: login with wrong user
lucashnss Mar 24, 2025
8d1c42d
Merge pull request #21 from lucashnss/master
lucashnss Mar 24, 2025
e47a597
Merge pull request #22 from lucashnss/dev
JoaoAntonioReis Mar 24, 2025
01ab54a
add: successfully register user by form
lucashnss Mar 24, 2025
363b993
Fix: Corrigindo cenários da feature top 10
ykarocin Mar 24, 2025
fa5ac95
Merge branch 'main' of https://github.com/ykarocin/ess-base-project-cc-1
ykarocin Mar 24, 2025
0f3e8ac
Merge pull request #23 from lucashnss/dev
ykarocin Mar 24, 2025
7ef4d52
Merge branch 'main' of https://github.com/ykarocin/ess-base-project-cc-1
ykarocin Mar 24, 2025
487fa73
Fix: Corrigindo cenários de recomendação
ykarocin Mar 24, 2025
1da482b
feat: adding frontend list/new list pages
Pedr0Domingues Mar 24, 2025
51166e7
Ref: Melhorando a legibilidade das funções curtir e descurtir do like…
ykarocin Mar 24, 2025
a30f531
Fix: Corrigindo import de arquivo da refatoração
ykarocin Mar 24, 2025
db4e686
Ref: Parametrizando url na pagina likedSeries do front
ykarocin Mar 24, 2025
72d31bb
fix: fixing list.routes
Pedr0Domingues Mar 24, 2025
e505daa
Merge pull request #25 from Pedr0Domingues/main
lucashnss Mar 24, 2025
3ce98d4
Merge branch 'lucashnss:main' into main
ykarocin Mar 24, 2025
4fb8ca5
Merge pull request #26 from ykarocin/main
lucashnss Mar 25, 2025
70c92bf
fix port and path problems
lucashnss Mar 26, 2025
14c3abb
Merge pull request #27 from lucashnss/dev
lukasales Mar 26, 2025
04fe627
refactor: create readUsersFromFile, writeUsersToFile to lead with jso…
lucashnss Mar 26, 2025
f4d883d
cleanup: remove imports and files not used
lucashnss Mar 26, 2025
048a222
fix: fix imports from the refactored code
lucashnss Mar 26, 2025
22aaf22
conflicts: resolving merge conflicts
lucashnss Mar 26, 2025
3b4ae65
tests: add login and registration tests, but cypress don't reach the …
lucashnss Mar 27, 2025
23e5633
Merge pull request #29 from lucashnss/dev
lucashnss Mar 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
__pycache__/

*.log
*.swp
*.swp

# Dependency directories
node_modules/
**/node_modules/
9 changes: 9 additions & 0 deletions backend/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Configuracoes para defini os parametros do editor de texto, Ex tamanho do espacamento dentre outros.
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace =
2 changes: 2 additions & 0 deletions backend/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV=DEV
PORT=5001
2 changes: 2 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENV=DEV
PORT=5001
10 changes: 10 additions & 0 deletions backend/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["no-unused-expressions"],
"rules": {
"no-unused-expressions": [
"warn",
{ "allowShortCircuit": true, "allowTernary": true }
]
}
}
38 changes: 38 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
coverage/

# Dependency directories
node_modules/
**/node_modules/


# Optional npm cache directory
.npm

# TypeScript cache
*.tsbuildinfo

# System files
.DS_Store
Thumbs.db

# Editor files
.vscode/

# Build files
dist/
lib/

# Env
.env
.env.test
.env.dev
.env.prod

# Deploy
.vercel
4 changes: 4 additions & 0 deletions backend/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
4 changes: 4 additions & 0 deletions backend/.husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run test
4 changes: 4 additions & 0 deletions backend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "es5"
}
80 changes: 80 additions & 0 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# ESS Back-end Node.js

This is the Back-end base project in Node.js for the Software and Systems Engineering discipline, offered by the Informatics Center (CIn) of the Federal University of Pernambuco (UFPE).

## Table of Contents

1. [Getting Started](##getting-started)
2. [Scripts](#scripts)
3. [Dependencies](#dependencies)
4. [Architecture](#architecture)

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

To run this project, you'll need to have the following software installed on your system:

- Node.js
- npm (Node Package Manager)

### Installing

Clone the repository and install the dependencies by running the following command in the project directory:

```
npm install
```

### First time running ?

Run the follow scripts

```
chmod +x .husky/pre-commit
chmod +x .husky/pre-push
```

```
npm run
```

### Environment

This project uses `.env` files to manage environment variables. You can create a `.env.dev` file in the project directory and set the environment variables in the file (iou can create it from .`env.example`). The `env` script in the `package.json` file uses the `env-cmd` package to load the environment variables from the `.env.dev` file.

### Running the Server

To start the server, run the following command:

```
env=dev npm run start
```

This command will run the TypeScript compiler in watch mode and start the server using nodemon.

## Scripts

The following scripts are available in the `package.json` file:

- `start`: Runs the TypeScript compiler in watch mode and starts the server using nodemon.
- `build`: Compiles the TypeScript code.
- `test`: Runs the Jest tests for the project.
- `prettier`: Formats the code using Prettier.
- `lint`: Lints the code using ESLint.

## Dependencies

The following dependencies are used in the project:

- [env-cmd](https://github.com/toddbluhm/env-cmd): A simple way to manage your environment variables in npm scripts.
- [express](https://github.com/expressjs/express): Fast, unopinionated, minimalist web framework for Node.js.
- [typescript](https://github.com/microsoft/TypeScript): A typed superset of JavaScript that compiles to plain JavaScript.
- [jest](https://github.com/microsoft/TypeScript): Jest is a delightful JavaScript Testing Framework with a focus on simplicity.
- [pino](https://github.com/pinojs/pino): Very low overhead Node.js logger.

## Architecture

To understand and learn more details about the structure of the project, click [here](./docs/architecture-pattern.md) to be redirected to the README that contains this information.
4 changes: 4 additions & 0 deletions backend/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
presets: ['@babel/preset-env'],
};

Binary file added backend/database.sqlite
Binary file not shown.
82 changes: 82 additions & 0 deletions backend/docs/architecture-pattern.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Architecture Pattern

The base project was created to give a quick "start" to the discipline's team projects. But, at the same time, we didn't want to give up a certain level of organization that helps to develop features safely and makes it easier to create tests.

## Table of Contents

1. [Layered architecture](#layered-architecture)
2. [What is the Model for?](#what-is-the-model-for)
3. [Dependency Injection](#dependency-injection)
4. [Database](#database)
5. [Routes](#routes)
6. [Conclusion](#conclusion)

---

# Layered architecture

Layered architecture is a software design approach where the software is separated into different layers (functional areas), each with a specific role and responsibility. In a typical layered architecture, you will find the following layers:

## Entities Layer

This layer represents the business data and the rules or logic that govern access to and updates of this data. These are typically the business objects (like Users, Products, Orders, etc.) and are independent of any specific technological choice (database, external services, etc.). They just contain data and methods to manipulate this data.

## Repository Layer

This layer acts as a bridge between the entities (business data) and the database. It is responsible for all database operations like create, read, update, and delete (CRUD). It basically interacts with your database or any other storage system.

## Service Layer

This layer contains the business logic of your application. It uses the repository layer to persist or retrieve the business data, performs necessary processing and passes the data to the controller. The service layer acts as an intermediary between the web layer (controllers) and the data access layer (repositories).

## Controller Layer

This layer is responsible for handling user requests and controlling the flow of the application. It interacts with the service layer to perform business operations and sends back the responses to the client. In a web application, these are typically the endpoints of your API.

The layered architecture approach helps in separating concerns, making the software solution scalable, and also promotes high cohesion and low coupling. This design pattern is beneficial because it aligns with the Single Responsibility Principle (SRP), which is a key aspect of SOLID principles in software design and architecture. Each layer has a specific role and does not need to concern itself with the responsibilities of any other layer. This makes each layer independently modifiable and testable, leading to a software design that is easier to maintain and expand.

---

# What is the Model for?

Models here are not absolutely essential, but are primarily used as a final representation of returned data. Unlike entities, which we can think of as a direct representation of a database table in code, we use models to represent what we could return in an endpoint.
For example, when retrieving a user from the database, we might not want to return its password. In this case, the model could represent a user excluding the password field.

But we can follow for example the idea of [​​DTOs](https://www.okta.com/identity-101/dto/), which would also be a good idea.
Feel free to explore alternatives for representing these data operations.

# Dependency Injection

Is a design pattern that allows a system to be more flexible, testable, and modular. It's a form of Inversion of Control (IoC) which means that the control is inverted - instead of an object controlling its own dependencies, it's controlled by an outside party.

In our case, we came up with a "homemade" solution that, overall, works very well. We use the Injector class, which is in charge of controlling our application's dependencies through its methods: registerService, getService, registerRepository and getRepository. The use of this class can be seen in the index.ts file, located in the **src/di folder**.

# Database

The idea of ​​a base project may seem complex when it proposes to cover many possibilities of use. Considering a practical and simple case, in this base project we are using the idea of ​​a "database" at runtime. In the **src/database/index.ts** file, we can observe the implementation of a simple interface for a database, where each "table" would be a set of key-values. Please don't see this as a limiter. If you prefer, you can choose to use a real database, be it SQL or NoSQL. By maintaining a similar level of project organization, the benefits will be the same.

To manipulate our database with base methods, we have a class called BaseRepository. This will be extended by other repositories, thus allowing the inheritance of these methods and the reuse of our code's logic.

# Routes

Worth mentioning is our backend routes/endpoints definition file located at **src/routes/index.ts**. Its idea is simple: for each new controller, you can configure it inside 'export default' using **'app.use'**.

```
export default (app: Express) => {
app.use(
prefix,
new TestController(router, di.getService(TestService)).router
);
app.use(
prefix,
new ExampleController(router, di.getService(ExampleService)).router
);
};

```

There is already an example in the file and the approach would be the same for all controllers. Thus, the controllers and their endpoints are registered and recognized in the application.

# Conclusion

Certainly, there are more details about the functionalities that are used in the project. However, the **Test** example case already covers many aspects, including testing. The base project is designed to make it easy, not to limit your preferences. What needs to be emphasized is that the main idea is the architecture used, which clearly distributes code responsibilities, thus facilitating maintenance and testing.
19 changes: 19 additions & 0 deletions backend/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleFileExtensions: ['js', 'json'],
rootDir: '',
testRegex: ['.*\.step\.js$'],
transform: {
'^.+\\.(tsx?|jsx?)$': 'ts-jest',
'^.+\\.ts$': 'ts-jest',
'^.+\\.js$': 'ts-jest',
'^.+\\.tsx?$': 'ts-jest', // Para arquivos TypeScript
'^.+\\.jsx?$': 'babel-jest', // Para arquivos JavaScript
},
setupFilesAfterEnv: [],
transformIgnorePatterns: ['/node_modules/'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts', '.tsx']
};
Loading