apify-test-tools 0.10.1-beta.0 → 0.10.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/_tests.yaml +1 -1
- package/CHANGELOG.md +1 -0
- package/bin/git.ts +1 -1
- package/dist/bin/git.js +1 -1
- package/dist/bin/git.js.map +1 -1
- package/dist/test/unit/bin/git.test.js +12 -0
- package/dist/test/unit/bin/git.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/test/unit/bin/git.test.ts +15 -0
package/package.json
CHANGED
|
@@ -144,6 +144,21 @@ describe('getChangedFiles', () => {
|
|
|
144
144
|
expect(gitCommandSpy).toHaveBeenCalledTimes(1);
|
|
145
145
|
expect(gitCommandSpy).toHaveBeenCalledWith(`git diff --name-only ${onlySha}~..${onlySha}`);
|
|
146
146
|
});
|
|
147
|
+
|
|
148
|
+
it('should return an empty list when the net diff is empty (e.g. a commit and its revert)', () => {
|
|
149
|
+
// Arrange
|
|
150
|
+
gitCommandSpy.mockReturnValue('');
|
|
151
|
+
const commits = [
|
|
152
|
+
{ sha: '1'.repeat(40), author: '', date: '', message: '' },
|
|
153
|
+
{ sha: '2'.repeat(40), author: '', date: '', message: '' },
|
|
154
|
+
];
|
|
155
|
+
|
|
156
|
+
// Act
|
|
157
|
+
const changedFiles = getChangedFiles(commits);
|
|
158
|
+
|
|
159
|
+
// Assert
|
|
160
|
+
expect(changedFiles).toStrictEqual([]);
|
|
161
|
+
});
|
|
147
162
|
});
|
|
148
163
|
|
|
149
164
|
describe('hasMergeFromTarget', () => {
|