DDanielinblog.chiubaka.com·Aug 10, 2022 · 4 min readWriting Shared Scripts for CircleCI OrbsProblem CircleCI Orbs provide an include directive that can be used to include scripts in an orb's command configurations. Unfortunately, this directive doesn't provide an obvious way of referencing other, shared scripts from within the included scri...00
DDanielinblog.chiubaka.com·Aug 2, 2022 · 11 min readFaithful E2E Testing of Nx Preset GeneratorsTLDR: Here's a full working example of a faithful E2E test for an Nx preset generator since the default generated E2E harness isn't correct. Putting it all together, here's a full sample test suite: import { checkFilesExist, cleanup, runNxComma...00
DDanielinblog.chiubaka.com·Jul 7, 2022 · 4 min readWriting Tests for Custom Matchers in JestTLDR: Here's an example of how to write a test for a custom matcher: describe("toHaveDevDependency", () => { it("fails when given a number", () => { expect(() => { expect(2).toHaveDevDependency("node"); }).toThrow("Expected 2 to be a ...00
DDanielinblog.chiubaka.com·May 7, 2021 · 3 min readIntegrating Sentry with NestJS scheduled jobsAfter integrating @ntegral/nestjs-sentry in my NestJS project, I was surprised to find errors in my logs that weren't being reported to Sentry. After a bit of investigation, I found that NestJS' native concepts of Interceptors and ExceptionFilters ar...00