Skip to content

Latest commit

 

History

History
81 lines (56 loc) · 2.57 KB

CONTRIBUTING.md

File metadata and controls

81 lines (56 loc) · 2.57 KB

Contributing to VS Code Light Switch

Thank you for being interested in contributing to our project! Contributions are more than welcome 🕺 Below are some useful information and guidelines for you to know before you submit a pull request.

Table of Contents

Getting Started

  • Install dependencies (day.js):
npm install dayjs --save

Code Structure

vscode-light_switch
└───images
└───src
    └───commands:     Every command goes here - includes the generic command binder
    └───test:         All test scripts are ran here.
    └───util:         General utilities
        └───date:     Date conversion with day.js
        └───workspace Basic functions for getting important workspace information

Ways to Contribute

Bug Reports

If you've found a bug, great! Before you add an issue, check if it is already reported.

Code Refactoring

Pull requests beautifying code/correcting typos are also welcome.

Enhancements

If you have any enhancement suggestions (be it minor improvements or completely new features), feel free to suggest them!

Testing Changes

If you have added something new, create a test script for it.

Test scripts for this project are located in the test directory src/test. The test runner script index.ts executes all tests defined in files ending with .test.ts in the test directory. More on VS Code Extension testing

Add a Test Script

  1. Create src/test/<exampleFeature>.test.ts:
import * as assert from 'assert';
import { before } from 'mocha';
import * as vscode from 'vscode';

suite('suiteName', () => {
  before(() => {
    // TODO: Add code to execute before test
  });

  test('Test name', () => {
    // TODO: Add testing code
    // Example: assert.equal(1, 2-1);
  });
});
  1. Head to the debugging area and choose Extension Tests to run the tests.