-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tests): Build in source sync temp folder (#6166)
* Enable and use new test data folder paths * Added nodejs tests
- Loading branch information
Showing
10 changed files
with
211 additions
and
24 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
2 changes: 1 addition & 1 deletion
2
tests/integration/testdata/sync/code/after/nodejs_function/app.js
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
5 changes: 5 additions & 0 deletions
5
tests/integration/testdata/sync/code/after/nodejs_local_dep/local-dep/index.js
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,5 @@ | ||
const foo = 123; | ||
|
||
exports.exported = () => { | ||
return foo; | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/integration/testdata/sync/code/after/nodejs_local_dep/local-dep/package.json
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 @@ | ||
{ | ||
"name": "local-dep", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"author": "" | ||
} | ||
|
10 changes: 10 additions & 0 deletions
10
tests/integration/testdata/sync/code/after/nodejs_local_dep/src/index.js
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,10 @@ | ||
const localDep = require("local-dep"); | ||
|
||
exports.handler = async (event, context) => { | ||
return { | ||
'statusCode': 200, | ||
'body': JSON.stringify({ | ||
message: localDep.exported(), | ||
}) | ||
}; | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/integration/testdata/sync/code/after/nodejs_local_dep/src/package.json
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,10 @@ | ||
{ | ||
"name": "src", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"author": "", | ||
"dependencies": { | ||
"local-dep": "file:../local-dep" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/integration/testdata/sync/code/before/nodejs_local_dep/src/index.js
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 @@ | ||
exports.handler = async (event, context) => { | ||
return { | ||
'statusCode': 200, | ||
'body': JSON.stringify({ | ||
message: 'no local dep', | ||
}) | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/integration/testdata/sync/code/before/nodejs_local_dep/src/package.json
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,10 @@ | ||
{ | ||
"name": "src", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"author": "", | ||
"dependencies": { | ||
"axios": "^0.27.2" | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
tests/integration/testdata/sync/code/before/template_nodejs_local_dep.yaml
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,10 @@ | ||
AWSTemplateFormatVersion : '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
|
||
Resources: | ||
PrintLocalDep: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: index.handler | ||
Runtime: nodejs18.x | ||
CodeUri: nodejs_local_dep/src |