Fixes / contributes to Issue #XXXX.
TODO
TODO
describe("ways to use Jest's test.each", () => { | |
test.each([ | |
[1, 1, 2], | |
[1, 2, 3], | |
[2, 1, 3], | |
])('.add(%i, %i)', (a, b, expected) => { | |
expect(a + b).toBe(expected) | |
}) |
import { defineConfig } from 'cypress' | |
const cypressConfig = defineConfig({ | |
video: true, | |
chromeWebSecurity: false, | |
e2e: { | |
baseUrl: 'http://localhost:3000', | |
supportFile: 'cypress/support/e2e/index.js', | |
setupNodeEvents(on, config) { | |
require('cypress-terminal-report/src/installLogsPrinter')(on, { |
# This script extracts the first line from stdin, | |
# then escapes single quotes, so it can be safely passed as an argument. | |
# get first line from stdin | |
FIRST_LINE=$(cat - | head -1) | |
# escape single quotes | |
echo "${FIRST_LINE}" | sed -e "s/'/'\\\\''/g" |
# Build from project root, with: | |
# $ docker build -t myorg-api-server . | |
# pruner stage: Only keep the source code that needs to be built | |
FROM node:16.16-alpine AS pruner | |
WORKDIR /app | |
COPY packages/ packages/ | |
COPY .yarnrc.yml package.json turbo.json yarn.lock . | |
RUN npx [email protected] prune --scope='@myorg/api-server' --docker |
import Ajv from "ajv" | |
import Fastify from "fastify" | |
import type { TypeBoxTypeProvider } from "@fastify/type-provider-typebox" | |
import type { Static } from "@sinclair/typebox" | |
import { Type } from "@sinclair/typebox" | |
export const payloadSchema = Type.Object({ | |
message: Type.String(), | |
}) |
// This script generates the call tree (a.k.a. call hierarchy, or dependency graph) of a function. | |
// | |
// Usage: $ npx node-ts find-function-calls.ts <target-file.ts> <target-function-name> | |
import util from "util" | |
import assert from "assert" | |
import * as ts from "typescript" | |
import * as tsmorph from "ts-morph" | |
import type { ReferenceEntry, Node, ReferencedSymbol } from "ts-morph" | |
import type { StandardizedFilePath } from "@ts-morph/common" |
Juste un mot pour dire que – après quelques heures d’essais et bidouillages multiples – shadow marche très bien sur Chromecast avec Google TV ! 👌
Je viens de finir Mass Effect 2, branché sur un écran sans audio + sur un hub USB lui même connecté à la fibre via Ethernet, une manette Stadia et une carte son externe branchée sur mes enceintes.
Les trucs à savoir:
Fonctionnalités qui me manquent
#!/bin/bash | |
set -e # will stop the script if any command fails with a non-zero exit code | |
function cleanup { | |
./teardown.sh || true # keep tearing down, even if file does not exist | |
echo "🧹 Cleaned up." | |
} | |
trap cleanup EXIT |