feat: create recognizable Early-20th-Century Warship Silhouettes
This commit is contained in:
@@ -17,6 +17,7 @@ test('ship sprite contains four independently drawn class symbols', () => {
|
||||
assert.equal(new Set(symbols).size, ids.length);
|
||||
assert.ok(Buffer.byteLength(sprite) < 15 * 1024);
|
||||
assert.ok(zlib.gzipSync(sprite).length < 5 * 1024);
|
||||
assert.doesNotMatch(sprite, /stroke=/);
|
||||
});
|
||||
|
||||
test('fleet CSS provides a shared red sunk cross overlay', () => {
|
||||
@@ -24,4 +25,15 @@ test('fleet CSS provides a shared red sunk cross overlay', () => {
|
||||
assert.match(css, /\.fleet-ship\.sunk::before, \.fleet-ship\.sunk::after/);
|
||||
assert.match(css, /border-top: \.16rem solid #ff5f55/);
|
||||
assert.match(css, /border-radius: 99rem/);
|
||||
assert.match(css, /\.fleet-ship\.sunk svg \{ opacity: \.48; \}/);
|
||||
});
|
||||
|
||||
test('fleet renderer gives every external symbol its own viewport', () => {
|
||||
const app = fs.readFileSync(path.join(__dirname, '../../data/app.js'), 'utf8');
|
||||
assert.match(app, /viewBox: '0 0 192 50'/);
|
||||
assert.match(app, /viewBox: '0 0 144 40'/);
|
||||
assert.match(app, /viewBox: '0 0 96 30'/);
|
||||
assert.match(app, /viewBox: '0 0 48 26'/);
|
||||
assert.match(app, /svg\.setAttribute\('viewBox', shipClass\.viewBox\)/);
|
||||
assert.match(app, /preserveAspectRatio', 'xMidYMax meet'/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user