typescript

-
Open in Logseq
    • Jest debugging
      • Functions on HTML pages You can't getById because of some stupid ideology, but you can put in ugly data-testid properties 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 {...}
    • 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.