This commit is contained in:
Juha Ristolainen 2017-03-18 18:34:27 +00:00
parent 9e4012436c
commit 574fa9f2e4
6 changed files with 10 additions and 76 deletions

View File

@ -6,6 +6,11 @@ All notable changes to the "code-stats-vscode" extension will be documented in t
### Changed
## [1.0.5] - 2017-03-18
### Changed
Changed language names to reflect the ones already used in Code::Stats.
## [1.0.4] - 2017-03-18
### Added
Added a manual mapping to natural language language names.

View File

@ -18,6 +18,10 @@ This extension contributes the following settings:
## Release Notes
### 1.0.5
Changed language names to reflect the ones already used in Code::Stats.
### 1.0.4
Added a manual mapping to natural language language names.

View File

@ -2,7 +2,7 @@
"name": "code-stats-vscode",
"displayName": "Code::Stats",
"description": "Code::Stats package for Visual Studio Code",
"version": "1.0.4",
"version": "1.0.5",
"publisher": "juha-ristolainen",
"icon": "logo.png",
"repository": {

Binary file not shown.

View File

@ -1,53 +0,0 @@
import * as assert from "assert";
// tslint:disable-next-line:no-unused-variable
import * as vscode from "vscode";
// tslint:disable-next-line:no-unused-variable
import * as codestats from "../src/code-stats";
import { Pulse } from "../src/pulse";
suite("code-stats-vscode extension tests", () => {
test("Initialized Pulse is empty", () => {
let pulse: Pulse = new Pulse();
const language: string = "typescript";
let initialXP: number = pulse.getXP(language);
assert.equal(initialXP, 0);
});
test("Add XP to Pulse", () => {
let pulse: Pulse = new Pulse();
const language1: string = "typescript";
const language2: string = "javascript";
const language3: string = "coffeescript";
const addedXP: number = 1000;
let xp1: number = pulse.getXP(language1);
let xp2: number = pulse.getXP(language2);
let xp3: number = pulse.getXP(language3);
assert.equal(xp1, 0);
assert.equal(xp2, 0);
assert.equal(xp3, 0);
pulse.addXP(language1, addedXP);
xp1 = pulse.getXP(language1);
xp2 = pulse.getXP(language2);
xp3 = pulse.getXP(language3);
assert.equal(xp1, addedXP);
assert.equal(xp2, 0);
assert.equal(xp3, 0);
pulse.addXP(language1, addedXP);
pulse.addXP(language2, addedXP);
xp1 = pulse.getXP(language1);
xp2 = pulse.getXP(language2);
xp3 = pulse.getXP(language3);
assert.equal(xp1, 2 * addedXP);
assert.equal(xp2, addedXP);
assert.equal(xp3, 0);
});
});

View File

@ -1,22 +0,0 @@
//
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
//
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: string, clb: (error:Error) => void) that the extension
// host can call to run the tests. The test runner is expected to use console.log
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.
var testRunner = require('vscode/lib/testrunner');
// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
useColors: true // colored output from test results
});
module.exports = testRunner;