-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
224 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,28 @@ | |
}, | ||
"operation": "merge" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "John Doe", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "Impostor", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.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 |
---|---|---|
|
@@ -45,6 +45,28 @@ | |
}, | ||
"operation": "merge" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "John Doe", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "Impostor", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.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 |
---|---|---|
|
@@ -45,6 +45,28 @@ | |
}, | ||
"operation": "merge" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "John Doe", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "Impostor", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.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 |
---|---|---|
|
@@ -45,6 +45,28 @@ | |
}, | ||
"operation": "merge" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "John Doe", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "Impostor", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.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 |
---|---|---|
|
@@ -45,6 +45,28 @@ | |
}, | ||
"operation": "merge" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "John Doe", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "Impostor", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.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 |
---|---|---|
|
@@ -45,6 +45,28 @@ | |
}, | ||
"operation": "merge" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "John Doe", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.js", | ||
"targetId": "describe_1", | ||
"path": "vendor.author", | ||
"value": { | ||
"name": "Impostor", | ||
"email": "[email protected]" | ||
}, | ||
"operation": "defaults" | ||
}, | ||
{ | ||
"type": "write_metadata", | ||
"testFilePath": "__tests__/default/hook-nesting.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const { metadata, $Assign, $Push, $Set, $Merge, $Unshift } = require('jest-metadata'); | ||
const { metadata, $Assign, $Defaults, $Push, $Set, $Merge, $Unshift } = require('jest-metadata'); | ||
|
||
let now = 1672524000000; | ||
|
||
|
@@ -14,6 +14,7 @@ const actions = { | |
|
||
const $Description = (text) => $Set('vendor.description', text); | ||
const $Maintainer = (name, email) => $Assign('vendor.maintainer', { name, email }); | ||
const $Author = (name, email) => $Defaults('vendor.author', { name, email }); | ||
const $Lead = (name, email) => $Merge('vendor.lead', { name, email }); | ||
const $Tag = (value) => $Push(['vendor', 'labels'], value); | ||
const $Flaky = () => $Unshift(['vendor', 'labels'], 'flaky'); | ||
|
@@ -22,6 +23,8 @@ const step = (text) => metadata.push('vendor.steps', [{ text, startedAt: now }]) | |
|
||
$Maintainer('Jane Smith', '[email protected]'); | ||
$Lead('Samantha Jones', '[email protected]'); | ||
$Author('John Doe', '[email protected]'); | ||
$Author('Impostor', '[email protected]'); | ||
$Description('This is a sample test suite.'); | ||
describe('Login flow', () => { | ||
$Description('Prepare the environment'); | ||
|
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,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cp package.tar.gz $TMPDIR | ||
rm -rf $TMPDIR/package-e2e | ||
cp -r package-e2e $TMPDIR/package-e2e | ||
|
||
cd $TMPDIR/package-e2e | ||
npm install | ||
npm test |
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 |
---|---|---|
|
@@ -568,7 +568,7 @@ tests_default_hook_nesting_js_hook_0 : id = "hook_0" | |
tests_default_hook_nesting_js_hook_0 : hookType = "beforeEach" | ||
object "DescribeBlockMetadata" as tests_default_hook_nesting_js_describe_1 #ded | ||
tests_default_hook_nesting_js_describe_1 : id = "describe_1" | ||
tests_default_hook_nesting_js_describe_1 : data = {\\n "vendor": {\\n "maintainer": {\\n "name": "Jane Smith",\\n "email": "[email protected]"\\n },\\n "lead": {\\n "name": "Samantha Jones",\\n "email": "[email protected]"\\n },\\n "description": "This is a sample test suite."\\n }\\n} | ||
tests_default_hook_nesting_js_describe_1 : data = {\\n "vendor": {\\n "maintainer": {\\n "name": "Jane Smith",\\n "email": "[email protected]"\\n },\\n "lead": {\\n "name": "Samantha Jones",\\n "email": "[email protected]"\\n },\\n "author": {\\n "name": "John Doe",\\n "email": "[email protected]"\\n },\\n "description": "This is a sample test suite."\\n }\\n} | ||
object "HookDefinitionMetadata" as tests_default_hook_nesting_js_hook_1 #fdd | ||
tests_default_hook_nesting_js_hook_1 : id = "hook_1" | ||
tests_default_hook_nesting_js_hook_1 : data = {\\n "vendor": {\\n "description": "Prepare the environment"\\n }\\n} | ||
|
@@ -1562,7 +1562,7 @@ tests_default_hook_nesting_js_hook_0 : id = "hook_0" | |
tests_default_hook_nesting_js_hook_0 : hookType = "beforeEach" | ||
object "DescribeBlockMetadata" as tests_default_hook_nesting_js_describe_1 #ded | ||
tests_default_hook_nesting_js_describe_1 : id = "describe_1" | ||
tests_default_hook_nesting_js_describe_1 : data = {\\n "vendor": {\\n "maintainer": {\\n "name": "Jane Smith",\\n "email": "[email protected]"\\n },\\n "lead": {\\n "name": "Samantha Jones",\\n "email": "[email protected]"\\n },\\n "description": "This is a sample test suite."\\n }\\n} | ||
tests_default_hook_nesting_js_describe_1 : data = {\\n "vendor": {\\n "maintainer": {\\n "name": "Jane Smith",\\n "email": "[email protected]"\\n },\\n "lead": {\\n "name": "Samantha Jones",\\n "email": "[email protected]"\\n },\\n "author": {\\n "name": "John Doe",\\n "email": "[email protected]"\\n },\\n "description": "This is a sample test suite."\\n }\\n} | ||
object "HookDefinitionMetadata" as tests_default_hook_nesting_js_hook_1 #fdd | ||
tests_default_hook_nesting_js_hook_1 : id = "hook_1" | ||
tests_default_hook_nesting_js_hook_1 : data = {\\n "vendor": {\\n "description": "Prepare the environment"\\n }\\n} | ||
|
@@ -2536,7 +2536,7 @@ tests_default_hook_nesting_js_hook_0 : id = "hook_0" | |
tests_default_hook_nesting_js_hook_0 : hookType = "beforeEach" | ||
object "DescribeBlockMetadata" as tests_default_hook_nesting_js_describe_1 #ded | ||
tests_default_hook_nesting_js_describe_1 : id = "describe_1" | ||
tests_default_hook_nesting_js_describe_1 : data = {\\n "vendor": {\\n "maintainer": {\\n "name": "Jane Smith",\\n "email": "[email protected]"\\n },\\n "lead": {\\n "name": "Samantha Jones",\\n "email": "[email protected]"\\n },\\n "description": "This is a sample test suite."\\n }\\n} | ||
tests_default_hook_nesting_js_describe_1 : data = {\\n "vendor": {\\n "maintainer": {\\n "name": "Jane Smith",\\n "email": "[email protected]"\\n },\\n "lead": {\\n "name": "Samantha Jones",\\n "email": "[email protected]"\\n },\\n "author": {\\n "name": "John Doe",\\n "email": "[email protected]"\\n },\\n "description": "This is a sample test suite."\\n }\\n} | ||
object "HookDefinitionMetadata" as tests_default_hook_nesting_js_hook_1 #fdd | ||
tests_default_hook_nesting_js_hook_1 : id = "hook_1" | ||
tests_default_hook_nesting_js_hook_1 : data = {\\n "vendor": {\\n "description": "Prepare the environment"\\n }\\n} | ||
|
Oops, something went wrong.