-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add user assigned mock geo for edge local dev (#4708)
* feat: add user assigned mock geo for edge local dev * feat: add user assigned mock geo for edge local dev * feat: add user assigned mock geo for edge local dev * fix: fix dot diff in test * fix: change regex to remove loading dots * fix: revert change * feat: alternate approach using CLI flag * fix: remove unneeded imports * chore: update docs * fix: add update command to allowables in validation * fix: fix logic error * feat: add cli flag for geo country * Update src/commands/dev/dev.js Co-authored-by: Eduardo Bouças <[email protected]> * chore: npm run docs * fix: update mock location defaults * chore: merge main * chore: merge main * chore: clean up code * fix: remove unnecessary prop * fix: add tests, refactor code * fix: remove unneccessary lines * fix: ignore geo flag when passing country flag * fix: update docs/add link to country codes * chore: update docs in right place this time * chore: fix parenthesis * chore: update contributors field * fix: rename mock props, update doc line * fix: update test * chore: update contributors field * chore: update contributors field * Update docs/commands/dev.md Co-authored-by: Daniel Tschinder <[email protected]> * Update src/commands/dev/dev.js Co-authored-by: Daniel Tschinder <[email protected]> * chore: update contributors field * chore: npm run docs Co-authored-by: Eduardo Bouças <[email protected]> Co-authored-by: JWhist <[email protected]> Co-authored-by: token-generator-app[bot] <token-generator-app[bot]@users.noreply.github.com> Co-authored-by: Daniel Tschinder <[email protected]>
- Loading branch information
1 parent
46168f1
commit f17b8a3
Showing
7 changed files
with
101 additions
and
12 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
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
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
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
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
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,22 @@ | ||
const process = require('process') | ||
|
||
const test = require('ava') | ||
|
||
const callCli = require('./utils/call-cli') | ||
const { withSiteBuilder } = require('./utils/site-builder') | ||
|
||
test('should throw if invalid country arg is passed', async (t) => { | ||
await withSiteBuilder('site-env', async (builder) => { | ||
await builder.buildAsync() | ||
|
||
const options = { | ||
cwd: builder.directory, | ||
extendEnv: false, | ||
PATH: process.env.PATH, | ||
} | ||
|
||
await t.throwsAsync(() => callCli(['dev', '--geo=mock', '--country=a1'], options)) | ||
await t.throwsAsync(() => callCli(['dev', '--geo=mock', '--country=NotARealCountryCode'], options)) | ||
await t.throwsAsync(() => callCli(['dev', '--geo=mock', '--country='], options)) | ||
}) | ||
}) |
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
f17b8a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Benchmark results
Package size: 227 MB
f17b8a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Benchmark results
Package size: 227 MB
f17b8a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Benchmark results
Package size: 227 MB
f17b8a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Benchmark results
Package size: 227 MB
f17b8a3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Benchmark results
Package size: 227 MB