diff --git a/docs/getting-started/athennarc-file.mdx b/docs/getting-started/athennarc-file.mdx index 681d34cc..d341207b 100644 --- a/docs/getting-started/athennarc-file.mdx +++ b/docs/getting-started/athennarc-file.mdx @@ -239,6 +239,7 @@ resolve the paths of your application: "logs": "storage/logs", "tests": "tests", "stubs": "tests/stubs", + "fixtures": "tests/fixtures", } } ``` diff --git a/docs/the-basics/helpers.mdx b/docs/the-basics/helpers.mdx index 156b9809..6a08799f 100644 --- a/docs/the-basics/helpers.mdx +++ b/docs/the-basics/helpers.mdx @@ -2338,6 +2338,22 @@ import { Is } from '@athenna/common' Is.Windows() // true ``` +#### `Is::Module()` + +Validate if a path or `File` instance is a module: + +```typescript +import { Is, File } from '@athenna/common' + +Is.Module('./hello.js') // true +Is.Module('./hello.ts') // true +Is.Module('./hello.json') // false + +Is.Module(new File('./hello.js')) // true +Is.Module(new File('./hello.ts')) // true +Is.Module(new File('./hello.json')) // false +``` + #### `Is::Uuid()` Validate if the value is a valid UUID v4: @@ -3969,6 +3985,26 @@ import { Path } from '@athenna/common' Path.setStubs('stubs/app') ``` +#### `Path::fixtures()` + +Merge the project root path with `Path.dirs.fixtures`: + +```typescript +import { Path } from '@athenna/common' + +console.log(Path.fixtures()) // /home/user/athenna-project/tests/fixtures +``` + +#### `Path::setFixtures()` + +Set the `Path.dirs.fixtures` value: + +```typescript +import { Path } from '@athenna/common' + +Path.setFixtures('fixtures/app') +``` + #### `Path::http()` Merge the project root path with `Path.dirs.http`: