-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add module enable/disable tests
- Add test cases to verify UTM tracking behavior when module is enabled - Add test cases to verify UTM tracking is disabled when module is configured off - Create new test fixture for disabled module configuration This ensures the module's `enabled` configuration option works as expected.
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<template> | ||
<div> | ||
<h1>UTM Tracker</h1> | ||
<pre>{{ $utm }}</pre> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { useNuxtApp } from "nuxt/app"; | ||
const { $utm } = useNuxtApp(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import UtmModule from "../../../src/module"; | ||
|
||
export default defineNuxtConfig({ | ||
modules: [UtmModule], | ||
utm: { | ||
enabled: false, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters