typescript
-
- see node
- Jest debugging
- Functions on HTML pages
You can't getById because of some stupid ideology, but you can put in ugly
data-testidproperties and use those with getByTestId - CSS properties obj.styles.display
- test predicates .not
- how can you run a single test file or test? npm i -g jest-cli (one time setup) jest bigquery/bigquery.service.spec.ts
- Testing private methods Access them through ['name'] Ugly but works
- Reflection / Introspectom JSON.stringify but it has problems with circular structure Ah this is better: util.inspect(object) Util is from? import * as util from 'util'; // has no default export
- Immutable or sensible operations I wrote a lib jsim.ts but it seems heavyweight for what it does How to have map with defaults {...}
- Nest REPL Oh my fucking god how did it take me 5 months to find this? https://docs.nestjs.com/recipes/repl a$ npm run start -- --entryFile repl
- Dates
- NPM latest version of a package npm view {pkg} version Note, I don't know equivalent of lein ancient, shows you what need updating. Oh well.