Skip to content

Commit

Permalink
Renamed a function per review.
Browse files Browse the repository at this point in the history
  • Loading branch information
jussi-kalliokoski committed Dec 5, 2014
1 parent 781a8dc commit 22d491d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions test/CarouselSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("Carousel", function () {
return [].slice.call(getElementsByClassName(element, "merry-go-round__page"));
}

function expectPages (list) {
function expectBufferedPageIndicesToMatch (list) {
expectChildrenByClassName("merry-go-round__page", list.length);
var actual = getPages().map(function (page) {
if ( page.childNodes.length === 0 ) {
Expand Down Expand Up @@ -133,7 +133,7 @@ describe("Carousel", function () {
cacheSize: 3,
});

expectPages([
expectBufferedPageIndicesToMatch([
null,
null,
null,
Expand All @@ -147,7 +147,7 @@ describe("Carousel", function () {
it("should default to `1`", function () {
prepare();

expectPages([
expectBufferedPageIndicesToMatch([
null,
0,
1,
Expand Down Expand Up @@ -228,7 +228,7 @@ describe("Carousel", function () {
});

it("should render all pages between current and previous, plus `cacheSize`", function () {
expectPages([
expectBufferedPageIndicesToMatch([
null,
0,
1,
Expand All @@ -252,7 +252,7 @@ describe("Carousel", function () {
});

it("should render only pages determined by `cacheSize`", function () {
expectPages([
expectBufferedPageIndicesToMatch([
2,
3,
null,
Expand Down Expand Up @@ -315,7 +315,7 @@ describe("Carousel", function () {
});

it("should ring buffer the `pages` array", function () {
expectPages([
expectBufferedPageIndicesToMatch([
1,
2,
3,
Expand Down
8 changes: 4 additions & 4 deletions test/FaderSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("Fader", function () {
return [].slice.call(getElementsByClassName(element, "merry-go-round__page"));
}

function expectPages (list) {
function expectBufferedPageIndicesToMatch (list) {
expectChildrenByClassName("merry-go-round__page", list.length);
var actual = getPages().map(function (page) {
if ( page.childNodes.length === 0 ) {
Expand Down Expand Up @@ -116,7 +116,7 @@ describe("Fader", function () {
cacheSize: 3,
});

expectPages([
expectBufferedPageIndicesToMatch([
null,
null,
null,
Expand All @@ -130,7 +130,7 @@ describe("Fader", function () {
it("should default to `1`", function () {
prepare();

expectPages([
expectBufferedPageIndicesToMatch([
null,
0,
1,
Expand Down Expand Up @@ -223,7 +223,7 @@ describe("Fader", function () {
});

it("should ring buffer the `pages` array", function () {
expectPages([
expectBufferedPageIndicesToMatch([
1,
2,
3,
Expand Down

0 comments on commit 22d491d

Please sign in to comment.