Commit f81737bb authored by Lucas Fernandes de Oliveira's avatar Lucas Fernandes de Oliveira

Merge branch 'issue/8' into 'develop'

Issue #8: Adiciona integração contínua

Closes #8

See merge request !5
parents 9b3e7433 9bc9bb2e
Pipeline #22010 passed with stage
in 56 seconds
image: node:10.16.3
cache:
paths:
- node_modules
stages:
- test
run_test:
stage: test
script:
- yarn install --frozen-lockfile --silent --non-interactive
- yarn test
tags:
- node
run_lint:
stage: test
script:
- yarn install --frozen-lockfile --silent --non-interactive
- yarn run lint
tags:
- node
\ No newline at end of file
......@@ -17,7 +17,7 @@ export class DBHandler {
new Jogador("Player1", [], [], 0.0)
, new Jogador("Player2", [], [], 100.0)
];
this.jogos = [
this.jogos = [
new Jogo("Overcooked", "fracasso", "fracasso", new Date("2010-01-01"), 200),
new Jogo("Tera", "FracassoXD", "FracassoXD", new Date("2010-01-01"), 0)
];
......
......@@ -5,7 +5,7 @@ export class Jogador {
private jogos: string[];
private amigos: string[];
private carteira: number;
constructor(name, jogos : Jogo[], amigos : Jogador[], carteira) {
constructor(name, jogos: Jogo[], amigos: Jogador[], carteira) {
this.name = name;
this.jogos = [];
for (const jogo of jogos) {
......
......@@ -14,7 +14,7 @@ export class Jogo {
}
public writeinfo(): string {
return "nome: " + this.name + " preço: " + this.price + " desenvolvedora: " + this.developer + " produtora: " + this.producer + " lançamento: " + this.release+ ".";
return "nome: " + this.name + " preço: " + this.price + " desenvolvedora: " + this.developer + " produtora: " + this.producer + " lançamento: " + this.release + ".";
}
public getname(): string {
return this.name;
......
......@@ -48,7 +48,6 @@ describe("Arquivo main.ts", () => {
.post("/jogo")
.send({nome: "Overcooked", dev: "fracasso", producer: "fracasso2", release: "2010-01-01", price: 20 })
.expect(200)
.expect((res: any) => {
expect(res.body).to.be.an("object");
expect(res.body).to.have.property("msg");
......
......@@ -25,7 +25,6 @@ const app = module.exports = express();
app.use("/", bodyParser.json());
app.use("/", dbhMW());
app.post("/inicio", (req: Request, res: express.Response) => {
const jogador: Jogador = new Jogador(req.body.nome, [], [], 0);
req.db.createplayer(jogador);
......
......@@ -7,6 +7,9 @@
"trailing-comma": false,
"interface-name": false,
"max-line-length": false,
"member-ordering": false
"member-ordering": false,
"no-console": false,
"ordered-imports": false,
"prefer-for-of": false
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment