Skip to content

Commit

Permalink
Merge pull request #694 from postmanlabs/release/v1.7.1
Browse files Browse the repository at this point in the history
Release v1.7.1
  • Loading branch information
webholik committed Mar 29, 2023
2 parents b2f0477 + d11cbcf commit 2e8e260
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v1.7.1 (March 29, 2023)
* Minor fix - Add language labels for Rust and Kotlin

v1.7.0 (March 28, 2023)
* Fix for - [#192](https://github.com/postmanlabs/postman-code-generators/issues/192) Added support for Rust reqwest code snippets.

Expand Down
4 changes: 3 additions & 1 deletion lib/assets/languageLabels.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"python": "Python",
"ruby": "Ruby",
"java": "Java",
"kotlin": "Kotlin",
"c": "C",
"php": "PHP",
"objective-c": "Objective-C",
Expand All @@ -19,5 +20,6 @@
"ocaml": "OCaml",
"shell": "Shell",
"dart": "Dart",
"r": "R"
"r": "R",
"rust": "Rust"
}
3 changes: 3 additions & 0 deletions npm/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ else
# check for .gitignore, license.md, readme.md, .eslintrc and package.json
mocha ./test/system/repository.test.js;

# runs test to see if the codegen interface is implemented correctly
mocha ./test/unit/lib.test.js;

# Common structure and npm test for each codegen.
echo -e "Running codegen-structure tests on all the codegens";
for directory in codegens/*; do
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postman-code-generators",
"version": "1.7.0",
"version": "1.7.1",
"description": "Generates code snippets for a postman collection",
"main": "index.js",
"directories": {
Expand Down
19 changes: 19 additions & 0 deletions test/unit/lib.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const expect = require('chai').expect,
lib = require('../../lib'),
labels = require('../../lib/assets/languageLabels.json');

describe('lib', function () {
describe('getLanguageList', function () {
it('should test that each language has a valid label', function () {
const list = lib.getLanguageList();

expect(list).to.be.an('array');

list.forEach(function (lang) {
expect(lang).to.have.property('key');
expect(lang).to.have.property('label');
expect(lang.label).to.equal(labels[lang.key]);
});
});
});
});

0 comments on commit 2e8e260

Please sign in to comment.