-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
…#55)
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
], | ||
"version": { | ||
"Major": 3, | ||
"Minor": 1, | ||
"Minor": 2, | ||
"Patch": 0 | ||
}, | ||
"minimumAgentVersion": "1.95.0", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import runTestTask from "./shared/testTaskRunner"; | ||
|
||
runTestTask({ | ||
webpackCompilationResult: { | ||
toJson: () => { | ||
return { | ||
errors: [], | ||
warnings: [] | ||
}; | ||
}, | ||
toString: (config: any) => { | ||
return "shouldReplaceBracketsToParenthesisInFilename"; | ||
} | ||
}, | ||
taskDisplayName: "webpack [something in brackets]", | ||
mockWriteFile: true | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as path from "path"; | ||
import { MockTestRunner } from "vsts-task-lib/mock-test"; | ||
import { assert } from "chai"; | ||
|
||
const mockRunnerDefinitions = "mockRunnerDefinitions"; | ||
|
||
export const executeTest = (done: MochaDone) => { | ||
const testPath = path.join(__dirname, mockRunnerDefinitions, "shouldReplaceBracketsToParenthesisInFilename.js"); | ||
const testRunner = new MockTestRunner(testPath); | ||
testRunner.run(); | ||
|
||
assert.isTrue(testRunner.succeeded, "task should be succeeded"); | ||
assert.isFalse(testRunner.failed, "task should be not failed"); | ||
|
||
const resultFileIsAttached = testRunner.stdOutContained("##vso[task.addattachment type=Distributedtask.Core.Summary;name=webpack [something in brackets] result;]"); | ||
assert.isTrue(resultFileIsAttached, "result file should be attached"); | ||
|
||
const resultFilenameConverted = testRunner.stdOutContained("webpack (something in brackets).webpack.result.md"); | ||
assert.isTrue(resultFilenameConverted, "attached filename should contain normal parenthesis"); | ||
|
||
done(); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export default "__GitVersion.SemVer__".replace("GitVersion.SemVer", "3.1.0").replace(/__/g, ""); | ||
export default "__GitVersion.SemVer__".replace("GitVersion.SemVer", "3.2.0").replace(/__/g, ""); |