Skip to content

Unit tests CI + Lint CI + Coefficients calc unit tests#103

Open
KleversonNascimento wants to merge 50 commits intoufabc-next:masterfrom
UFABCNextOps:add-some-tests
Open

Unit tests CI + Lint CI + Coefficients calc unit tests#103
KleversonNascimento wants to merge 50 commits intoufabc-next:masterfrom
UFABCNextOps:add-some-tests

Conversation

@KleversonNascimento
Copy link
Copy Markdown
Contributor

@KleversonNascimento KleversonNascimento commented Nov 5, 2021

Change Request

Description

This PR is a combination of:
Add CI to run unit tests: UFABCNextOps#6
Add lint to CI: UFABCNextOps#7
Add unit tests to coefficients calc: https://github.com/ufabc-next/ufabc-next-server/blob/bb4bb8cafc1ce4bc1280f3cd88a5b7782a50ee45/app/helpers/calculate/coefficients.spec.js

'BHQ0001-15', // IDENT.E CULTURA
]
const date = new Date("2021-04-01")
const func = findIdeais(date)
Copy link
Copy Markdown
Contributor Author

@KleversonNascimento KleversonNascimento Nov 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hadeoliveira tive que excluir aqui porque func não estava sendo usada e isso dá erro no lint, na verdade o problema é que esse teste não tava testando a função de verdade, só estava comparando o array expectedCourses com ele mesmo, você pode corrigir?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correção efetuada e submetida no PR #104

@KleversonNascimento KleversonNascimento changed the title Add some tests Unit tests CI + Lint CI + Coefficients calc unit tests Nov 5, 2021
JhonataSantana and others added 14 commits November 19, 2021 17:55
Agora o comando "Coverage" está funcional e o report é registrado no arquivo "coverage.lcov", deixando a função de análise dos resultados, para a geração de badge ou outras finalidades, de forma independente por meio de outros comandos, como o utilizado no CI em conjunto com o Codecov.
@KleversonNascimento KleversonNascimento changed the base branch from master to add-simulation December 8, 2021 13:59
@KleversonNascimento KleversonNascimento changed the base branch from add-simulation to master December 8, 2021 13:59
teoria: {
name: 'Vanessa Kruth',
error: null,
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 8 spaces but found 12.

Suggested change
},
},

{
teoria: {
name: 'Isidro',
error: 'Sala não encontrada',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 10 spaces but found 16.

Suggested change
error: 'Sala não encontrada',
error: 'Sala não encontrada',

it('should return empty list when has not errors', function () {
const disciplinas = [
{
teoria: {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 8 spaces but found 12.

Suggested change
teoria: {
teoria: {

name: 'Vanessa Kruth',
error: null,
},
pratica: {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 8 spaces but found 12.

Suggested change
pratica: {
pratica: {

describe('teachers', function () {
it('should return empty list when has not errors', function () {
const disciplinas = [
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 6 spaces but found 8.

Suggested change
{
{

},
{
teoria: {
name: 'Isidro',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 10 spaces but found 16.

Suggested change
name: 'Isidro',
name: 'Isidro',

error: null,
}
},
];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Extra semicolon.

Suggested change
];
]

pratica: {
name: 'Vanessa Kruth',
error: null,
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 8 spaces but found 12.

Suggested change
}
}

{
teoria: {
name: 'Vanessa Kruth',
error: null,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 10 spaces but found 16.

Suggested change
error: null,
error: null,

const disciplinas = [
{
teoria: {
name: 'Vanessa Kruth',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Expected indentation of 10 spaces but found 16.

Suggested change
name: 'Vanessa Kruth',
name: 'Vanessa Kruth',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants