| Total files | Total lines of code | Duplicated lines | % of duplications |
|---|---|---|---|
| 261 | 7182 | 193 | 2.69% |
0% Total files: 38, total lines of code: 542, duplicated lines: 0[Top ↑↑↑]
0% Total files: 20, total lines of code: 227, duplicated lines: 0[Top ↑↑↑]
6.44% Total files: 43, total lines of code: 1025, duplicated lines: 66[Top ↑↑↑]
},
"devDependencies": {
"gulp-cli": "^2.2.0",
"tslint": "^5.18.0",
"typescript": "^3.5.0"
},
"scripts": {
"build": "./node_modules/.bin/gulp build --config data-stack",
"depcheck": "../../node_modules/.bin/depcheck || true",
"lint:ts:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json",
"lint:ts:ci:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json -t checkstyle -o reports/tslint-tslint.xml"
},
"paths": {
"build": {
"base": "./dist",
"js": "./dist/*.js",
"main": "./dist/index.js"
},
"src": {
"base": "./src",
"ts": "./src/**/*.ts"
}
}
}},
"devDependencies": {
"fa-icons": "^0.1.5",
"lit-element": "^2.2.1",
"node-sass": "^4.12.0",
"rollup": "^1.4.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-typescript2": "^0.25.3",
"tslint": "^5.18.0",
"typescript": "^3.5.0"
},
"scripts": {
"build": "./bin/build.sh",
"depcheck": "../../node_modules/.bin/depcheck || true",
"docker:start": "docker-compose up --build -d",
"lint:ts:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json",
"lint:ts:ci:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json -t checkstyle -o reports/tslint-tslint.xml"
},
"workspaces": {
"nohoist": [
"@fortawesome"
]
}
},
"lit-element": "^2.2.1",
"node-sass": "^4.12.0",
"rollup": "^1.4.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-typescript2": "^0.25.3",
"tslint": "^5.18.0",
"typescript": "^3.5.0"
},
"scripts": {
"build": "./bin/build.sh",
"depcheck": "../../node_modules/.bin/depcheck || true",
"docker:start": "docker-compose up --build -d",
"lint:ts:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json",
"lint:ts:ci:tslint": "./node_modules/.bin/tslint -p . -c ../../tslint.json -t checkstyle -o reports/tslint-tslint.xml"
}
}0% Total files: 18, total lines of code: 506, duplicated lines: 0[Top ↑↑↑]
0% Total files: 5, total lines of code: 71, duplicated lines: 0[Top ↑↑↑]
2.96% Total files: 103, total lines of code: 3753, duplicated lines: 111[Top ↑↑↑]
, (): void => {
const manager = new Engine();
const entity = manager.createEntity();
expect(entity).not.toBeNull();
expect(entity).toBeInstanceOf(Entity);
expect(manager.getEntities().size).toBe(1);
manager.removeEntity("42", (): void => {
const model = new ConcreteObservable();
expect(model.getObservers().length).toBe(0);
const observer = new ConcreteObserver();
model.attach(observer);
expect(model.getObservers().length).toBe(1);
model;
const expected = document.createElement("p");
const when = document.createElement("span");
when.textContent = whenMessage;
const what = document.createElement("span");
what.textContent = ` - ${eventMessage}`;
expected.appendChild(when);
expected.appendChild(what);
Console.getInstance().append(eventMessage);
expect(
document.getElementsByClassName("console")[0],const screenEnterSpy = jest.spyOn(StartScreen.prototype, "enter");
const screenRenderSpy = jest.spyOn(StartScreen.prototype, "render");
const screen = new StartScreen(new Engine());
const game = new Game();
game.switchScreen(screen);
game();
screen.render(new Display(24, 80));
expect(displaySpy).toHaveBeenCalledTimes(22);
});
describe("handleInput", () => {
each([
[
null,
{
data: {},
type: "keydown",
},
],
[
null,
{
data: { keyCode: Keys.RETURN },
type: "keydown",
},
],
]).test(" should return appropriate value", (expected, params) => {
const screen = new WinScreen, (): void => {
const mockEntity = new Entity("42");
mockEntity.addComponent(new MoveableComponent());
mockEntity.addComponent(new PositionComponent());
const mockEntities: Map<string, Entity> = new Map<string, Entity>();
mockEntities.set("42", mockEntity);
const mockMove;
const mockMap = new GameMap(1, 1);
const mapPosition = { x: 0, y: 0 };
const originalImpl = GameMap.prototype.getTile;
GameMap.prototype.getTile = jest.fn().mockImplementation(() => {
return mockTile;
});
const system = new MovementSystem(entities, mapPosition);
const mapPosition = { x: 0, y: 0 };
const originalImpl = GameMap.prototype.getTile;
GameMap.prototype.getTile = jest.fn().mockImplementation(() => {
return mockTile;
});
const system = new MovementSystem(entities, mapPosition, mockMap);
const expected: MoveInterface = {
canMove: false();
const mockMap = new GameMap(1, 1);
const mapPosition = { x: 0, y: 0 };
const originalImpl = GameMap.prototype.getTile;
GameMap.prototype.getTile = jest.fn().mockImplementation(() => {
return mockTile;
});
const system = new MovementSystem(entities, mapPosition, mockMap);
const expected: MoveInterface = {
canMove: false,
newPosition: mapPosition,
};
expect(system.canMove()).toStrictEqual(expected);
GameMap.prototype.getTile = originalImpl;
});
}0% Total files: 2, total lines of code: 262, duplicated lines: 0[Top ↑↑↑]
0% Total files: 2, total lines of code: 221, duplicated lines: 0[Top ↑↑↑]
0% Total files: 1, total lines of code: 8, duplicated lines: 0[Top ↑↑↑]
6.84% Total files: 8, total lines of code: 234, duplicated lines: 16[Top ↑↑↑]
<title>{{%PROJECT_TITLE%}}</title>
<link type="text/plain" rel="author" href="humans.txt" />
<link href="./vendor.css" rel="stylesheet" />
<link href="./style.css" rel="stylesheet" />
</head>
<body <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="application-name" content="Space Roguelike" />
<meta name="description" content="Space Roguelike" />
<meta name="robots" content="index, follow" />
<meta name="google" content="nositelinkssearchbox" />
<meta name="version" content="{{%VERSION%}}" />
<link rel="home" href="/" />
<title>Jérôme0% Total files: 19, total lines of code: 330, duplicated lines: 0[Top ↑↑↑]
0% Total files: 2, total lines of code: 3, duplicated lines: 0[Top ↑↑↑]