-
-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add test for combine tools script #3136
Merged
+504
−27
Merged
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
7bbc0a8
tools test added
vishvamsinh28 527cf9f
tools test updated for errors
vishvamsinh28 878023a
tools test upadted
vishvamsinh28 aedbb7c
Merge branch 'master' into combineToolsTest
vishvamsinh28 86b914e
Merge branch 'master' into combineToolsTest
vishvamsinh28 be80885
refactor build-tools
vishvamsinh28 b04532e
Merge branch 'master' into combineToolsTest
vishvamsinh28 3ea1852
Merge branch 'master' into combineToolsTest
vishvamsinh28 1dfd188
87% coverage
vishvamsinh28 103d643
fewgw
vishvamsinh28 b3a87dd
fewgw
vishvamsinh28 8357f56
fewgwfwf
vishvamsinh28 db96f45
wf
vishvamsinh28 2b392d1
fwefgwe
vishvamsinh28 877990e
test update
vishvamsinh28 88b1491
test update
vishvamsinh28 dd90f3c
test update
vishvamsinh28 c347dbf
test update again
vishvamsinh28 71e4f13
coverage 98%
vishvamsinh28 03e0664
fefefge
vishvamsinh28 18e9d98
100% coverage
vishvamsinh28 b3ae94b
test cases for error added
vishvamsinh28 014fdb6
fixures
vishvamsinh28 e74251e
fixture update
vishvamsinh28 07a7dc3
fixutures again
vishvamsinh28 511c00f
Merge branch 'master' into combineToolsTest
vishvamsinh28 91ad534
Merge branch 'combineToolsTest' of https://github.com/vishvamsinh28/w…
vishvamsinh28 a78dfa1
idjwqf
vishvamsinh28 8577070
Merge branch 'master' into combineToolsTest
vishvamsinh28 57f4dc3
fwqefqe
vishvamsinh28 0f9052e
tests updated
vishvamsinh28 a8ab07c
Merge branch 'master' into combineToolsTest
vishvamsinh28 a454c8d
Merge branch 'master' into combineToolsTest
vishvamsinh28 b7bf6c9
Merge branch 'master' into combineToolsTest
vishvamsinh28 f95ecce
buildtools update
vishvamsinh28 acb1ec3
add empty line at last
vishvamsinh28 61ac558
Merge branch 'master' into combineToolsTest
vishvamsinh28 906a873
Merge branch 'master' into combineToolsTest
anshgoyalevil 5c4c192
update path
vishvamsinh28 6940c12
Merge branch 'master' into combineToolsTest
anshgoyalevil aeabab2
wfq
vishvamsinh28 db33c88
supress logs
vishvamsinh28 820de27
test and function update
vishvamsinh28 b16fca9
commit to re run the workflow
vishvamsinh28 995b9bd
commit to re run the workflow again
vishvamsinh28 4a4dcb7
Merge branch 'master' into combineToolsTest
vishvamsinh28 bd6424d
added retry mechanicasm for enoent errors
vishvamsinh28 233efdd
use fsextra
vishvamsinh28 4b13fc8
update test
vishvamsinh28 0489f2d
fqewfewqf
vishvamsinh28 774da3f
fqewfewqf
vishvamsinh28 7c24517
fqwefge
vishvamsinh28 7279d79
commit to re run the workflow
vishvamsinh28 2eccf52
Merge branch 'master' into combineToolsTest
vishvamsinh28 7601440
test upadted
vishvamsinh28 9afb39b
Merge branch 'combineToolsTest' of https://github.com/vishvamsinh28/w…
vishvamsinh28 464b1dc
Merge branch 'master' into combineToolsTest
vishvamsinh28 496de09
Merge branch 'master' into combineToolsTest
vishvamsinh28 2419f06
Merge branch 'master' into combineToolsTest
vishvamsinh28 11fcfe6
test updated
vishvamsinh28 7536a96
add empty line at the end
vishvamsinh28 5164452
fege
vishvamsinh28 ca72a7f
fqefe
vishvamsinh28 65fcfbd
Merge branch 'master' into combineToolsTest
vishvamsinh28 302b332
Merge branch 'master' into combineToolsTest
vishvamsinh28 1698ce2
fege
vishvamsinh28 31c66ec
Merge branch 'master' into combineToolsTest
vishvamsinh28 3ea3753
Merge branch 'master' into combineToolsTest
vishvamsinh28 fa11169
Merge branch 'master' into combineToolsTest
vishvamsinh28 7a55807
Merge branch 'master' into combineToolsTest
vishvamsinh28 0a7e3c2
Merge branch 'master' into combineToolsTest
vishvamsinh28 993310e
removed try/catch block from tests related to errors
vishvamsinh28 97905ba
Merge branch 'master' into combineToolsTest
vishvamsinh28 94f362c
Merge branch 'master' into combineToolsTest
vishvamsinh28 9d3aa7c
Merge branch 'master' into combineToolsTest
vishvamsinh28 05b14a2
Merge branch 'master' into combineToolsTest
vishvamsinh28 8587110
Merge branch 'master' into combineToolsTest
vishvamsinh28 1cc25cb
Merge branch 'master' into combineToolsTest
vishvamsinh28 40dcc54
Merge branch 'combineToolsTest' of https://github.com/vishvamsinh28/w…
vishvamsinh28 5d23088
remove new line
vishvamsinh28 fca4dcc
fix indentation errors
vishvamsinh28 98f3238
updated error logging
vishvamsinh28 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,212 @@ | ||
const expectedDataT1 = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vishvamsinh28 This file has indentation errors. Kindly fix it. |
||
languages: [ | ||
{ | ||
name: 'JavaScript', | ||
color: 'bg-[#57f281]', | ||
borderColor: 'border-[#37f069]', | ||
}, | ||
{ | ||
name: 'Python', | ||
color: 'bg-[#3572A5]', | ||
borderColor: 'border-[#3572A5]', | ||
}, | ||
], | ||
technologies: [ | ||
{ | ||
name: 'Node.js', | ||
color: 'bg-[#61d0f2]', | ||
borderColor: 'border-[#40ccf7]', | ||
}, | ||
{ | ||
name: 'Flask', | ||
color: 'bg-[#000000]', | ||
borderColor: 'border-[#FFFFFF]', | ||
}, | ||
], | ||
}; | ||
|
||
const manualToolsWithMissingData = [ | ||
{ | ||
title: 'Tool C', | ||
filters: {}, | ||
links: { repoUrl: 'https://github.com/asyncapi/tool-c' }, | ||
}, | ||
]; | ||
|
||
const manualToolsToSort = { | ||
category1: { | ||
description: 'Sample Category', | ||
toolsList: [ | ||
{ | ||
title: 'Tool Z', | ||
filters: { language: 'JavaScript' }, | ||
links: { repoUrl: 'https://github.com/asyncapi/tool-z' }, | ||
}, | ||
{ | ||
title: 'Tool A', | ||
filters: { language: 'Python' }, | ||
links: { repoUrl: 'https://github.com/asyncapi/tool-a' }, | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
const toolWithMultipleLanguages = { | ||
title: 'Multi-Language Tool', | ||
filters: { | ||
language: ['JavaScript', 'Python', 'NewLanguage'], | ||
technology: ['Node.js'], | ||
}, | ||
links: { repoUrl: 'https://github.com/example/multi-language-tool' }, | ||
}; | ||
|
||
const automatedToolsT5 = { | ||
category1: { | ||
description: 'Category 1 Description', | ||
toolsList: [toolWithMultipleLanguages], | ||
}, | ||
}; | ||
|
||
const invalidToolT4 = { title: 'Invalid Tool' }; | ||
|
||
const automatedToolsT4 = { | ||
category1: { | ||
description: 'Category 1 Description', | ||
toolsList: [], | ||
}, | ||
}; | ||
const manualToolsT4 = { | ||
category1: { | ||
toolsList: [invalidToolT4], | ||
}, | ||
}; | ||
|
||
const toolWithNewTagsT6 = { | ||
title: 'New Tags Tool', | ||
filters: { | ||
language: 'NewLanguage', | ||
technology: ['NewTechnology'], | ||
}, | ||
links: { repoUrl: 'https://github.com/example/new-tags-tool' }, | ||
}; | ||
|
||
const automatedToolsT6 = { | ||
category1: { | ||
description: 'Category 1 Description', | ||
toolsList: [toolWithNewTagsT6], | ||
}, | ||
}; | ||
|
||
const toolWithNewLanguageT7 = { | ||
title: 'New Language Tool', | ||
filters: { | ||
language: 'Go', | ||
technology: ['Node.js'], | ||
}, | ||
links: { repoUrl: 'https://github.com/example/new-language-tool' }, | ||
}; | ||
|
||
const automatedToolsT7 = { | ||
category1: { | ||
description: 'Category 1 Description', | ||
toolsList: [toolWithNewLanguageT7], | ||
}, | ||
}; | ||
|
||
const validToolT8 = { | ||
title: 'Valid Tool', | ||
filters: { | ||
language: 'JavaScript', | ||
technology: ['Node.js'], | ||
}, | ||
links: { repoUrl: 'https://github.com/asyncapi/valid-tool' }, | ||
}; | ||
|
||
const automatedToolsT8 = { | ||
category1: { | ||
description: 'Category 1 Description', | ||
toolsList: [], | ||
}, | ||
}; | ||
|
||
const manualToolsT8 = { | ||
category1: { | ||
toolsList: [validToolT8], | ||
}, | ||
}; | ||
|
||
const toolWithoutRepoUrlT9 = { | ||
title: 'Tool Without Repo', | ||
filters: { | ||
language: 'Python', | ||
technology: ['Flask'], | ||
}, | ||
links: {}, | ||
}; | ||
|
||
const automatedToolsT9 = { | ||
category1: { | ||
description: 'Category 1 Description', | ||
toolsList: [], | ||
}, | ||
}; | ||
|
||
const manualToolsT9 = { | ||
category1: { | ||
toolsList: [toolWithoutRepoUrlT9], | ||
}, | ||
}; | ||
|
||
const invalidAutomatedToolsT10 = { | ||
invalidCategory: { | ||
description: 'Invalid Category Description', | ||
toolsList: [], | ||
}, | ||
}; | ||
|
||
const manualToolsWithInvalidURLT11 = { | ||
category1: { | ||
toolsList: [ | ||
{ | ||
title: 'Tool with Invalid URL', | ||
filters: { language: 'JavaScript' }, | ||
links: { repoUrl: 'invalid-url' }, | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
const circularTool = { | ||
title: 'Circular Tool', | ||
filters: { | ||
language: 'JavaScript', | ||
technology: ['Node.js'], | ||
}, | ||
links: { repoUrl: 'https://github.com/asyncapi/circular-tool' }, | ||
}; | ||
|
||
const automatedToolsT12 = { | ||
category1: { | ||
description: 'Category 1', | ||
toolsList: [circularTool], | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
expectedDataT1, | ||
manualToolsWithMissingData, | ||
manualToolsToSort, | ||
automatedToolsT5, | ||
automatedToolsT4, | ||
manualToolsT4, | ||
automatedToolsT6, | ||
automatedToolsT7, | ||
automatedToolsT8, | ||
manualToolsT8, | ||
automatedToolsT9, | ||
manualToolsT9, | ||
circularTool, | ||
automatedToolsT12, | ||
invalidAutomatedToolsT10, | ||
manualToolsWithInvalidURLT11, | ||
}; |
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,17 @@ | ||
{ | ||
"category1": { | ||
"description": "Sample Category", | ||
"toolsList": [ | ||
{ | ||
"title": "Tool B", | ||
"filters": { | ||
"language": "Python", | ||
"technology": ["Flask"] | ||
akshatnema marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
"links": { | ||
"repoUrl": "https://github.com/asyncapi/tool-b" | ||
} | ||
} | ||
] | ||
} | ||
} |
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 @@ | ||
[ | ||
{ | ||
"title": "Tool A", | ||
"filters": { | ||
"language": "JavaScript", | ||
"technology": ["Node.js"] | ||
}, | ||
"links": { | ||
"repoUrl": "https://github.com/asyncapi/tool-a" | ||
} | ||
} | ||
] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
what does
tagspath
signify??