Skip to content

Commit

Permalink
refactor: rename mode values
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas committed Oct 19, 2022
1 parent ac09d84 commit fdc4043
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ enum ConfigExitCode {

// eslint-disable-next-line no-shadow
export const enum Mode {
BeforeCache = 'before_cache',
AfterCache = 'after_cache',
BeforeCache = 'before-cache',
AfterCache = 'after-cache',
}

export interface FunctionConfig {
Expand Down
2 changes: 1 addition & 1 deletion node/manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ test('Generates a manifest with pre and post-cache routes', () => {
const declarations = [
{ function: 'func-1', path: '/f1' },
{ function: 'func-2', mode: 'not_a_supported_mode', path: '/f2' },
{ function: 'func-3', mode: 'after_cache', path: '/f3' },
{ function: 'func-3', mode: 'after-cache', path: '/f3' },
]
const manifest = generateManifest({ bundles: [bundle1, bundle2], declarations, functions })

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default async () => new Response('Hello from user function 4. I should run after the cache!')

export const config = () => ({
mode: 'after_cache',
mode: 'after-cache',
path: '/user-func4',
})

0 comments on commit fdc4043

Please sign in to comment.