FreeAllMedia / stimpak

An easy-to-use system for defining, discovering, and re-using code, text, and workflow patterns
http://stimpak.io
MIT License
8 stars 1 forks source link

Spec: "it should transform given answers" looks like an ineffective test #34

Closed warang580 closed 8 years ago

warang580 commented 8 years ago

I think the spec is wrong because transformed is already set to 5 (and not "5") when assignated, and not modified through transform().

        let answers = {
            transformed: 5,
            untouched: "5"
        };

        stimpak
            .answers(answers)
            .transform(callbackA)
            .generate(error => {
                stimpak.answers().transformed.should.eql(5);
                stimpak.answers().untouched.should.eql("5");

                done(error);
            });

I think this is how it should be written : https://github.com/FreeAllMedia/stimpak/compare/develop...warang580:fix/transform

But this spec doesn't pass. It looks like you are only using transforms() if there are prompts to show. I didn't found a working way to change it for now.

warang580 commented 8 years ago

Also, the Stimpak transform() documentation is not correct in the API. It looks like it's a copy/paste that you forgot to edit.

dcrockwell commented 8 years ago

FYI, this is only a renamed .cast feature. Renamed because it does more than just casting.

dcrockwell commented 8 years ago

Closed by 2e03bba14704143f42840285b1e25d2bd1b54c46

dcrockwell commented 8 years ago

Fixed version released: https://github.com/FreeAllMedia/stimpak/releases/tag/0.1.1