Skip to content

Commit b3184f4

Browse files
committed
fix normalize path issue on Linux
1 parent 6889d06 commit b3184f4

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.5.4] - 2016-03-20
6+
- fix: normalize path issue on Linux
7+
58
## [0.5.3] - 2016-03-13
69
- `loadEditor` for loading editor files
710
- `loadGlobal` for loading global data
@@ -15,4 +18,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1518
- return `result.completed`: boolean, if all tests pass
1619

1720
## [0.4.4] - 2016-02-26
18-
- `snippets.cson`, for quickly generating tests
21+
- *snippets.cson*, for quickly generating tests

lib/loaders.js

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ function getCrossPlatformPath(pathTo) {
1616
if (process.platform.match(/win/)) {
1717
pathTo = pathTo.replace(/\\/g, '/');
1818
}
19-
else {
20-
pathTo = pathTo.replace(/\//g, '\\');
21-
}
2219
return pathTo;
2320
}
2421
global.loadEditor = loadEditor;

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mocha-coderoad",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"description": "mocha test runner & reporter for atom-coderoad",
55
"main": "lib/runner.js",
66
"scripts": {
@@ -26,6 +26,8 @@
2626
},
2727
"homepage": "https://github.com/coderoad/mocha-coderoad#readme",
2828
"dependencies": {
29+
"babel-core": "^6.7.2",
30+
"babel-preset-es2015": "^6.6.0",
2931
"mocha": "2.4.5"
3032
},
3133
"devDependencies": {

src/loaders.ts

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ function getCrossPlatformPath(pathTo: string): string {
1717
pathTo = path.normalize(pathTo);
1818
if (process.platform.match(/win/)) {
1919
pathTo = pathTo.replace(/\\/g, '/');
20-
} else {
21-
pathTo = pathTo.replace(/\//g, '\\');
2220
}
2321
return pathTo;
2422
}

src/typings/cr/globals.d.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
interface Global {
2-
load: (pathToContext: string) => void;
2+
loadEditor: (pathToContext: string, options?: Object) => void;
3+
loadGlobal: (name: string, pathToContext: string) => void;
4+
}
5+
6+
interface ObjectConstructor {
7+
assign(target: any, ...sources: any[]): any;
8+
}
9+
10+
declare var global: Global;
11+
12+
declare module 'babel-core' {
13+
var babel: any;
14+
export default babel;
315
}

0 commit comments

Comments
 (0)