Compare commits
	
		
			4 Commits
		
	
	
		
			vsvipul/fi
			...
			tiwarishub
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 720afb64bc | ||
|   | b418234642 | ||
|   | 8eca997a5c | ||
|   | 969a5c2539 | 
| @@ -215,6 +215,23 @@ test("getInputAsArray handles empty lines correctly", () => { | ||||
|     expect(actionUtils.getInputAsArray("foo")).toEqual(["bar", "baz"]); | ||||
| }); | ||||
|  | ||||
| test("getInputAsArray sorts files correctly", () => { | ||||
|     testUtils.setInput( | ||||
|         "foo", | ||||
|         "bar\n!baz\nwaldo\nqux\nquux\ncorge\ngrault\ngarply" | ||||
|     ); | ||||
|     expect(actionUtils.getInputAsArray("foo")).toEqual([ | ||||
|         "!baz", | ||||
|         "bar", | ||||
|         "corge", | ||||
|         "garply", | ||||
|         "grault", | ||||
|         "quux", | ||||
|         "qux", | ||||
|         "waldo" | ||||
|     ]); | ||||
| }); | ||||
|  | ||||
| test("getInputAsArray removes spaces after ! at the beginning", () => { | ||||
|     testUtils.setInput( | ||||
|         "foo", | ||||
| @@ -223,11 +240,11 @@ test("getInputAsArray removes spaces after ! at the beginning", () => { | ||||
|     expect(actionUtils.getInputAsArray("foo")).toEqual([ | ||||
|         "!bar", | ||||
|         "!baz", | ||||
|         "!qux", | ||||
|         "!quux", | ||||
|         "!qux", | ||||
|         "!waldo", | ||||
|         "corge", | ||||
|         "grault! garply", | ||||
|         "!waldo" | ||||
|         "grault! garply" | ||||
|     ]); | ||||
| }); | ||||
|  | ||||
|   | ||||
| @@ -147,7 +147,7 @@ test("restore with no key", async () => { | ||||
| test("restore with too many keys should fail", async () => { | ||||
|     const path = "node_modules"; | ||||
|     const key = "node-test"; | ||||
|     const restoreKeys = [...Array(20).keys()].map(x => x.toString()); | ||||
|     const restoreKeys = [...Array(20).keys()].map(x => x.toString()).sort(); | ||||
|     testUtils.setInputs({ | ||||
|         path: path, | ||||
|         key, | ||||
|   | ||||
							
								
								
									
										3
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/restore/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -38437,7 +38437,8 @@ function getInputAsArray(name, options) { | ||||
|         .getInput(name, options) | ||||
|         .split("\n") | ||||
|         .map(s => s.replace(/^!\s+/, "!").trim()) | ||||
|         .filter(x => x !== ""); | ||||
|         .filter(x => x !== "") | ||||
|         .sort(); | ||||
| } | ||||
| exports.getInputAsArray = getInputAsArray; | ||||
| function getInputAsInt(name, options) { | ||||
|   | ||||
							
								
								
									
										3
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								dist/save/index.js
									
									
									
									
										vendored
									
									
								
							| @@ -38437,7 +38437,8 @@ function getInputAsArray(name, options) { | ||||
|         .getInput(name, options) | ||||
|         .split("\n") | ||||
|         .map(s => s.replace(/^!\s+/, "!").trim()) | ||||
|         .filter(x => x !== ""); | ||||
|         .filter(x => x !== "") | ||||
|         .sort(); | ||||
| } | ||||
| exports.getInputAsArray = getInputAsArray; | ||||
| function getInputAsInt(name, options) { | ||||
|   | ||||
| @@ -62,7 +62,8 @@ export function getInputAsArray( | ||||
|         .getInput(name, options) | ||||
|         .split("\n") | ||||
|         .map(s => s.replace(/^!\s+/, "!").trim()) | ||||
|         .filter(x => x !== ""); | ||||
|         .filter(x => x !== "") | ||||
|         .sort(); | ||||
| } | ||||
|  | ||||
| export function getInputAsInt( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user