Skip to content

Commit

Permalink
Add Wallaby integration (vscode-icons#1515)
Browse files Browse the repository at this point in the history
* Add wallaby.js integration

* Add special thanks
  • Loading branch information
JimiC authored and robertohuertasm committed Mar 18, 2018
1 parent 7ec752b commit 34c2fa1
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/vscode-icons/vscode-icons.svg)](https://isitmaintained.com/project/vscode-icons/vscode-icons "Average time to resolve an issue")
[![Percentage of issues still open](https://isitmaintained.com/badge/open/vscode-icons/vscode-icons.svg)](https://isitmaintained.com/project/vscode-icons/vscode-icons "Percentage of issues still open")

[![Wallaby.js](https://img.shields.io/badge/wallaby.js-configured-green.svg)](https://wallabyjs.com)

---

Bring icons to your [Visual Studio Code](https://code.visualstudio.com/) (**minimum supported version: `1.8.1`**)
Expand Down Expand Up @@ -113,6 +115,12 @@ Branded icons are licensed under their copyright license.

You can checkout all our changes in our [change log](https://github.com/vscode-icons/vscode-icons/blob/master/CHANGELOG.md).

## Acknowledgements

We like to express our "Special Thanks" to:

* The [Wallaby.js](https://wallabyjs.com) team for creating an **awesome** development tool and for their generosity in providing us with a license.

## Related extensions

* [vscode-icons for GitHub](https://github.com/dderevjanik/github-vscode-icons) by [@dderevjanik](https://github.com/dderevjanik) will allow you to see all `GitHub`'s files with `vscode-icons` icons.
Expand Down
5 changes: 5 additions & 0 deletions test/iconGenerator/functionality.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ describe('IconGenerator: functionality test', function () {

it('calls the \'updatePackageJson\' function when said to',
function () {
sandbox.stub(utils, 'getRelativePath').returns('.');
const writeJsonToFile = sandbox.stub(iconGenerator, 'writeJsonToFile');
const updatePackageJson = sandbox.stub(iconGenerator, 'updatePackageJson');
iconGenerator.persist('path/to/file', defaultSchema, true);
Expand All @@ -223,6 +224,7 @@ describe('IconGenerator: functionality test', function () {

it('logs an error if something goes wrong',
function () {
sandbox.stub(utils, 'getRelativePath').returns('.');
sandbox.stub(iconGenerator, 'writeJsonToFile');
sandbox.stub(fs, 'writeFileSync').throws(new Error());
const errorLog = sandbox.stub(console, 'error');
Expand All @@ -235,6 +237,7 @@ describe('IconGenerator: functionality test', function () {

it('if the icons folder path has changed',
function () {
sandbox.stub(utils, 'getRelativePath').returns('.');
const writeJsonToFile = sandbox.stub(iconGenerator, 'writeJsonToFile');
const writeFileSync = sandbox.stub(fs, 'writeFileSync');
sandbox.stub(console, 'info');
Expand All @@ -250,6 +253,7 @@ describe('IconGenerator: functionality test', function () {

it('if the icons folder path has not changed',
function () {
sandbox.stub(utils, 'getRelativePath').returns('.');
const writeJsonToFile = sandbox.stub(iconGenerator, 'writeJsonToFile');
const writeFileSync = sandbox.stub(fs, 'writeFileSync');
sandbox.stub(console, 'info');
Expand All @@ -260,6 +264,7 @@ describe('IconGenerator: functionality test', function () {

it('if the icons theme path does not exists',
function () {
sandbox.stub(utils, 'getRelativePath').returns('.');
const writeJsonToFile = sandbox.stub(iconGenerator, 'writeJsonToFile');
const writeFileSync = sandbox.stub(fs, 'writeFileSync');
sandbox.stub(console, 'info');
Expand Down
38 changes: 38 additions & 0 deletions wallaby.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = (wallaby) => ({
files: [
"src/**/*.ts",
"test/support/*.ts",
"locale/lang.*.json",
"package.json",
"package.nls.json",
"package.nls.template.json",
"icons/*.*"
],
tests: [
"test/**/*.test.ts"
],
filesWithNoCoverageCalculated: [
],
preprocessors: {
'**/*.json': (file, done) => {
done(file.rename(`../${file.path}`).content)
},
"icons/*.*": (file, done) => {
done(file.rename(`../${file.path}`).content)
}
},
hints: {
ignoreCoverage: /\/* wallaby ignore next\/*/
},
testFramework: "mocha",
env: {
type: "node",
runner: `${require('os').homedir()}/.nvm/versions/node/v7.9.0/bin/node`
},
delays: {
run: 500
},
debug: true,
reportConsoleErrorAsError: true,
setup: (wallaby) => wallaby.testFramework.ui('bdd')
});

0 comments on commit 34c2fa1

Please sign in to comment.