These are chat archives for mojotech/pioneer

19th
May 2015
Steven Langbroek
@StevenLangbroek
May 19 2015 13:39
so, i'm starting an expressjs server in @BeforeAll, but it runs that command once for each steps-file pioneer opens, not before all tests... same goes for @AfterAll, after each file instead of after all files
Sam Saccone
@samccone
May 19 2015 14:46
@Before
:)
@StevenLangbroek
Steven Langbroek
@StevenLangbroek
May 19 2015 14:47
rly?
Sam Saccone
@samccone
May 19 2015 14:47
rly
4realz
:hearts:
Steven Langbroek
@StevenLangbroek
May 19 2015 14:47
4realsies?
no take-backsies ok?
Sam Saccone
@samccone
May 19 2015 14:47
foshizzliezislitisc
Steven Langbroek
@StevenLangbroek
May 19 2015 14:47
word
Sam Saccone
@samccone
May 19 2015 14:49
🐴
Tom Hicks
@tomhicks
May 19 2015 14:51
You can also use cucumber's @registerHandler method
🍄
Sam Saccone
@samccone
May 19 2015 14:51
:candy:
Jarid Margolin
@jaridmargolin
May 19 2015 20:49
@samccone - Can I pass in require and feature via command line?
Sam Saccone
@samccone
May 19 2015 20:50
yep :)
Jarid Margolin
@jaridmargolin
May 19 2015 20:54
so I through in some logs and it appears to be adding the passed flags, but not overwriting defaults provided by pioneer
Sam Saccone
@samccone
May 19 2015 20:54
hmm
Jarid Margolin
@jaridmargolin
May 19 2015 20:54
'--require',
  'tests/shared/steps',
  '--require',
  'tests/shared/widgets',
  '--require',
  'tests/steps',
  '--require',
  'tests/widgets',
I'll figure it out. No worries.
mmm. it doesn't overwrite and it appears to be intentional
if name is 'require' and config[name]?
          obj[name] = Array::concat(obj[name]).concat(config[name])
Sam Saccone
@samccone
May 19 2015 20:59
oh you want to overide
:|
hmm
Jarid Margolin
@jaridmargolin
May 19 2015 20:59
My app has 2 different distributions with a large portion of the code being shared
Sam Saccone
@samccone
May 19 2015 20:59
ah
i might have two config files then
maybe
Jarid Margolin
@jaridmargolin
May 19 2015 21:01
mmmm yea ok. that should work.
any reason why require specifically does not overwrite? I was able to overwrite feature
Sam Saccone
@samccone
May 19 2015 21:01
yeah...
maybe it should
file it?
we can change it
Jarid Margolin
@jaridmargolin
May 19 2015 21:02
cool
Jarid Margolin
@jaridmargolin
May 19 2015 23:26
@samccone - if you are still around...
curious on why you chose to attach widgets to the env
why not have them just be normal classes that are required where needed?
(looking into the best way to subclass a widget)
this whole syntax seems a little odd:
module.exports = function(){
  this.Widgets = this.Widgets || {};

  this.Widgets.TodoList = this.Widget.List.extend({
    root: "#todo-list"
  });
}
Tom Hicks
@tomhicks
May 19 2015 23:46
I think it's because it needs access to @driver but we get around it by doing a quick global assignment of @Widget to global.__Widget then expose that global via a normal commonjs module. A bit of a hack but it lets you just require in Widget when necessary to a private var