Skip to content

Small Cleanups #1168

@BioPhoton

Description

@BioPhoton

Cleanup and cosmetic changes

Testing

Mocks folder

  • Rename nx-plugin/mock to models/mocks
  • Rename examples/plugins/src/lighthouse/mockto examples/plugins/src/lighthouse/mocks
  • After all folders are renamed to mocks adjust inputs in nx.json
    • "!{projectRoot}/@(test|mocks|mock)/**/*"
    • "!{projectRoot}/**/?(*.)mock.[jt]s?(x)"

Mocks creation

  • unify test folder setup and document it. Use the creation from static files instead of generator
    • e2e/ci-e2e/setup.ts#setupTestReop
    • e2e/ci-e2e/test-folder-setup.ts#restoreNxIgnoredFiles

Test Coverage

  • improve test coverage config to exclude as much noise as possible and increase coverage
    • src/lib/index.ts - exclude files that only maintain exports e.g. index.ts (in some places index.ts files also contain actual logic. here I we can refactor to have all index.ts used for barrel export only and only in src root)
    • exclude other files that are not relevant for test coverage

Caching

  • Move zod2md.ts under {projectRoot}/tools and make sure "!{projectRoot}/tools/**/*" is added under nx.json#namedInputs.production chore: add zod2md-nx-plugin #1162
  • remove vitest executor defaults from nx.json in favour of target name as they are conflicting and only one of them wins.
 "e2e": {
      "cache": true,
      "inputs": ["default", "test-vitest-inputs"],
      "dependsOn": ["^build"]
  },
  "@nx/vite:test": {
    "cache": true,
    "inputs": ["default", "test-vitest-inputs"],
    "options": {
      "passWithNoTests": true,
      "watch": false
    }
  },

Tasks

Configuration

  • add nx plugin for build target and add zod2md-jsdocs dependencies

Graph

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions