I recently ran into a classic case of "our code is using way more memory than it should". So I took my first dive into memory profiling Rust code. I read several posts about this, including the following
Discover gists
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Documentación oficial sobre Jest
- Instalaciones de desarrollo (super test es útil para probar Express)
npm install -D jest @types/jest ts-jest supertest
Documentación oficial sobre Jest
- Instalaciones de desarrollo (super test es útil para probar Express)
npm install -D jest @types/jest ts-jest supertest
Más información - Docs Oficiales
- Instalar TypeScript y tipos de Node, como dependencia de desarrollo
npm i -D typescript @types/node
- Inicializar el archivo de configuración de TypeScript ( Se puede configurar al gusto)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function create() { | |
// Load a map from a 2D array of tile indices | |
const level = [ | |
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 1, 2, 3, 0, 0, 0, 1, 2, 3, 0 ], | |
[ 0, 5, 6, 7, 0, 0, 0, 5, 6, 7, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 14, 13, 14, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], | |
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], |
NewerOlder