mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-21 04:26:14 -04:00
Pause when tab is hidden, using visibility change api
This commit is contained in:
parent
1a56b5f1d1
commit
33d74e8c84
68 changed files with 7290 additions and 6933 deletions
|
@ -1,28 +1,35 @@
|
|||
|
||||
import _palette from "./palette.json";
|
||||
import _rawLevelsList from "./levels.json";
|
||||
import _appVersion from "./version.json";
|
||||
|
||||
describe('json data checks', ()=>{
|
||||
it('_rawLevelsList has icon levels', ()=>{
|
||||
expect(_rawLevelsList.filter(l=>l.name.startsWith('icon:')).length).toBeGreaterThan(10)
|
||||
})
|
||||
it('_rawLevelsList has non-icon few levels', ()=>{
|
||||
expect(_rawLevelsList.filter(l=>!l.name.startsWith('icon:')).length).toBeGreaterThan(10)
|
||||
})
|
||||
describe("json data checks", () => {
|
||||
it("_rawLevelsList has icon levels", () => {
|
||||
expect(
|
||||
_rawLevelsList.filter((l) => l.name.startsWith("icon:")).length,
|
||||
).toBeGreaterThan(10);
|
||||
});
|
||||
it("_rawLevelsList has non-icon few levels", () => {
|
||||
expect(
|
||||
_rawLevelsList.filter((l) => !l.name.startsWith("icon:")).length,
|
||||
).toBeGreaterThan(10);
|
||||
});
|
||||
|
||||
it('_rawLevelsList has max 5 colors per level', ()=>{
|
||||
const levelsWithManyBrickColors=_rawLevelsList.filter(l=>{
|
||||
|
||||
const uniqueBricks = l.bricks.split('').filter(b=>b!=='_' && b!=='black').filter((a,b,c)=>c.indexOf(a)===b)
|
||||
return uniqueBricks.length>5
|
||||
}).map(l=>l.name)
|
||||
expect(levelsWithManyBrickColors).toEqual([])
|
||||
})
|
||||
it('Has a few colors', ()=>{
|
||||
expect(Object.keys(_palette).length).toBeGreaterThan(10)
|
||||
})
|
||||
it('Has an _appVersion', ()=>{
|
||||
expect(parseInt(_appVersion)).toBeGreaterThan(2000)
|
||||
})
|
||||
})
|
||||
it("_rawLevelsList has max 5 colors per level", () => {
|
||||
const levelsWithManyBrickColors = _rawLevelsList
|
||||
.filter((l) => {
|
||||
const uniqueBricks = l.bricks
|
||||
.split("")
|
||||
.filter((b) => b !== "_" && b !== "black")
|
||||
.filter((a, b, c) => c.indexOf(a) === b);
|
||||
return uniqueBricks.length > 5;
|
||||
})
|
||||
.map((l) => l.name);
|
||||
expect(levelsWithManyBrickColors).toEqual([]);
|
||||
});
|
||||
it("Has a few colors", () => {
|
||||
expect(Object.keys(_palette).length).toBeGreaterThan(10);
|
||||
});
|
||||
it("Has an _appVersion", () => {
|
||||
expect(parseInt(_appVersion)).toBeGreaterThan(2000);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue