We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey! This is really neat-- I ran into the same issue and used the snippet of your code to layout the items in my CSS Grid properly.
I also wrote some unit tests, if you'd like to use them.
describe('reorder', function () { it('should reorder successfully when rows are divisible', function () { const initialArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; const endArray = [0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11]; expect(reorder(initialArray, 3)).to.have.ordered.members(endArray); }); it('should reorder successfully when rows are not evenly divisible', function () { const initialArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; const endArray = [0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8]; expect(reorder(initialArray, 3)).to.have.ordered.members(endArray); }); it('should return the same array if num columns are less than array length', function () { const initialArray = [0, 1, 2, 3, 4]; const endArray = [0, 1, 2, 3, 4]; expect(reorder(initialArray, 5)).to.have.ordered.members(endArray); }); });
The text was updated successfully, but these errors were encountered:
@cranberryofdoom thanks so much!
Sorry, something went wrong.
No branches or pull requests
Hey! This is really neat-- I ran into the same issue and used the snippet of your code to layout the items in my CSS Grid properly.
I also wrote some unit tests, if you'd like to use them.
The text was updated successfully, but these errors were encountered: