Skip to content
New issue

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

Return values ... #1

Open
bigtiger opened this issue Oct 24, 2012 · 3 comments
Open

Return values ... #1

bigtiger opened this issue Oct 24, 2012 · 3 comments

Comments

@bigtiger
Copy link

I'm not sure whether I love this idea or not but, my first thought as I looked at the code was to make the output more readable/usable/parseable.

Instead of:

grid-columns five-columns-at-960px {
  expect: true;
}

What do you think of:

grid-columns five-columns-at-960px {
  expect: success();
}

This way success could be parsed or could be defined to have a behavior.

Similarly:

grid-columns five-columns-at-960px {
  expect: 95px;
}

could be:

grid-columns five-columns-at-960px {
  expect: failed_with("95px");
}

There's too much logic in SCSS for me to ignore the potential of regression and the fact that I'm relying on a ton of third-party code.

@joefiorini
Copy link
Contributor

Thanks @bigtiger, I like that idea. At the very least it could make responding to successes or failures easier if we ran the output back through the parser again.

Could you expound on your last statement? I'm not sure I understood what you meant. :)

@bigtiger
Copy link
Author

That's my (obviously poorly stated) argument for TDD in SCSS. There's logic there. It could regress by my action, or in the case of framework changes, or someone else's.

@joefiorini
Copy link
Contributor

Gotcha, once I reread your post it made sense. That is a big part of why I started this.

The more I think about this idea the more I like it. I realized that SCSS is probably the only language that would let you compile the compiled output. If it will output something like what you posted above that we could then recompile, would that be a sufficient test runner for now? I will play with this when I get some time over the next couple days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants