►
From YouTube: Pair Programming - Moving Karma specs to Jest (ide/libs)
Description
**Result:**
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30398
**Highlights:**
- 03:20 We get started but run into some issues with merging directories in bash
- 06:30 We decide to move files to `ide_new` to get started on actually converting things to Jest
- 13:20 We fix some web worker stuff by introducing a shared mock
- 23:50 We uncover a spec that was dependent on unrelated Karma specs running first
- 46:20 We write a code mod for converting import aliases
- 53:40 We figure out why our codemod was erroring which wasn't our codemod after all
A
A
A
A
B
A
Think
ID
is
gonna,
be
the
biggest
hit
yeah.
Let's
do
it
yeah,
so
we
have
a
script
for
this
and
if,
if
any
of
you
are
bash,
a
really
good
a
bash
that'd
be
great
because
I
don't
totally
know
how
to
do
this,
where
I
want
to
copy
all
the
files
in
here
into
the
front-end
IDE
folder,
but
the
front-end
idea
folder
already
exists,
you
can
use
MB,
that's
fine!
It's
merged!
It's
merged!
Okay,
I,
didn't
know.
Yeah.
B
B
A
A
A
A
B
A
B
B
A
A
C
To
learn
how
to
do
this,
cuz
I
think
you
can.
If
you
do
the
move
comment
and
you
want
to
move
like
all
the
files
in
the
folder
I
think
you
can
do
move
V,
and
then
you
put
the
pack
with
the
star
and
then
you
put
the
path
of
the
folder
you
want.
So
then
I
give
you
ite
slash,
star,
yeah,
I,
think
and
then
a
slash
at
the
end.
I
think
that
will
work
I.
A
B
A
B
B
A
A
A
A
When
we
run
this
script,
we
have
to
run
it
from
this
directory
because
you
wants
to
use
this
directories
node
modules,
but
that's
no
problem.
Here's
and
the
readme
is
little
instructions
for
how
to
run
it
and,
as
we
run
it
we
might
find.
Oh,
we
can
just
add
a
quick
code
mod
to
fix
something.
If
you
could
do
that,
that's
fantastic
because
it's
gonna
fix
it
for
everyone.
That's
trying
to
move
things
over
to
Jess
one
specific
one
that
comes
to
mind.
A
Know
I
I
kind
of
hope
so,
but
I
haven't
seen
a
lot
of
activity
on
it
and
I
haven't
been
active
on
it.
I
have
known
then
a
few
of
these
pairing
sessions.
We've
made
changes
to
it,
but
it
seems
like
this
don't
ever
end
up
in
master
which
they
really
should
and
we
shouldn't
feel
like.
We
have
to
wait
for
a
strict
review
or
something
here.
A
A
Alright,
processing,
37
files,
ok
13
unmodified
24-
were
changed.
Its
analysis.
Try
it
out,
I'll,
see,
let's
see
which
ones.
Maybe
we
get
some
for
free?
Let's
see
what
happens?
Usually
they
wonder.
Don't
that
view
stuff
they
go
in
for
free
yeah.
Let's
so
I'd
suggest.
Maybe
let's
run
it
on
a
directory
like
maybe
can
run
on
Lib.
First,
let's
see
what
happens
there.
So
I
probably
haven't
installed
packages
I.
A
A
What's
my
fans
are
spinning,
sounds.
B
A
B
A
For
saying
them,
this
one's
super
fast
and
it
passes,
I
am
promoting
it.
A
It
is
going
I'm,
not
even
gonna.
Look
at
what
changed.
Okay,
only
350
more
to
go
model
manager
is
next,
and
this
common
pulled
in.
A
A
A
Yeah,
let
me
just
jump
it
to
wherever
we're
doing
this
weird.
Where
is
this
new
dirty
diff
controller?
That's
probably
why
the
other
ones
are.
The
controller
ones
are
failing
to
diff
worker
yeah
and
so
are
yep.
It
just
has
a
head
eventlistener,
let's
see
what
other?
What
other
API
is
thing
asks:
worker,
God,
post
message,
remove
event,
listener
terminate,
add
eventlistener.
Okay,
we've
already
mocked
a
worker
before
so
you
can
kind
of
copy
that
I
could
look
and
I
think
it
in
front-end
worker,
yes
step
here,
we
go.
A
We
have
our
tree
worker
that
we've
mocks
before
it's
actually
same
yeah,
so
it
would
probably
cool
to
just
create
one.
You
know
one
mock
worker
that
we
just
kind
of
reused
and
these
files,
let's
go,
do
that
that
might
be
kind
of
neat,
so
I
would
I
would
put
that
in
the
helpers.
Maybe
what
do
you
think
go.
B
A
Okay,
we
could
put
it
in
here.
This
has
an
interesting
history
behind
it.
This
folder
that
I
don't
know
if
it's
be
really
clear,
because
this
actually
does
something
really
similar
to
what
under
underscore
mocks
does
for
some
reason
we
weren't
using
this
at
first
and
we
kind
of
did
our
homegrown
mocks
folder.
So
it
wasn't
really
like
reusable
mark
stuff.
It
was
meant
to
do
here's
some
manual
Maki,
which
is
why
I'm
hesitant
to
put
it
inside
this
box
folder,
but
it
could
be.
A
A
So
it's
cool-
if
we,
if
we
do
put
this
in
one,
if
we
do
put
this
in
one
consolidated
place,
we
could
change
this.
So
it's
not
just
stubbed
out
methods,
but
we
could
change
it
where
it
actually
kind
of
does
something
if
we
feel
it
kind
of
looks
like
production.
If
we
feel
like
that's
helpful,
but
right
now,
I
think
I
think
we're
good.
So
what
I'm
gonna
do
here,
then
I'm
going
to
import
web
worker
mock
helpers.
A
B
A
A
Diff
worker-
it's
just
if
I
lost
it:
okay
ide
lived
if
and
we're
gonna
call
it
diff
work
and
it's
gonna
do
the
same
thing.
So
we
could
add
the
jessica's
config
level.
Oh
look
at
that.
Okay,
nice.
At
the
justice
complete
level.
We
could
say
anything
that
we
import
with
underscore
worker.
We
want
to
import
from
web
worker
mock.
That
might
be
what
we
actually
really
want
to
do.
A
We
want
to
do
a
a
test
level
mock
like
maybe
that's
something
I'd
want
to
do
at
the
test
level,
not
globally,
so
I
can
foresee
us
eventually
removing
these
files
and
doing
an
alias
where,
if
I
import
with
underscore
worker,
we
just
pointed
to
that
web
worker
mock,
but
for
now
I'm
keeping
a
split
up
because
I'm
not
entirely
sure
if
that's
gonna
be
helpful
or
not,
but
we're
so
close.
Now,
let's
check
these
others
out.
I
think.
B
A
A
A
Yeah
these
values
come
from
come
from.
Let's
go
ahead,
dive
into
it
and
see
what
happens
Oh
what?
Why
am
I
in
a
tight
grip
file?
This
is
Monaco
stuff
right,
I
guess:
I
did
just
jump
in
the
monocle
snap,
a
candle
isn't
opening
to
jump.
I
didn't.
A
A
B
A
Okay,
let's
go
to
the
top
here.
We
have
our
instance.
Okay,
it's
created
that
yep.
We
use
instant.
We
use
the
editor
that
create
which
gives
us
the
singleton
Bank.
Maybe
we
need
to
just
not
use
that
create,
but
the
only
time
we're
using
Darby.
Oh
my
gosh,
then
we
do
it
over
here.
It
just
do
Neal
HS
and
that's
it
yeah.
B
A
A
B
A
At
this
point,
we
should
have
been
created
with
no
options,
so
we're
not
passing
any
custom
options
to
this
thing
here.
Weird
like
we
are
given
like
a
theme:
vs
whites
like
we're
worth
and
I
think
I.
My
opinion
is
I
think
these
are
coming
from,
because
karma
tests
would
have
kept
this
singleton
around
the
whole.
A
A
A
A
B
B
A
A
B
B
A
B
A
A
A
Oh,
it's
technically
read-only
as
false.
Oh
no
read-only
is
true
by
default.
Okay
yeah
that
pass,
and
that
did
it
that's
a
lot
cleaner
and
that
looks
nice
and
it
also
highlighted
hey.
We
are
not
testing
that
we
actually
do
the
right
thing
if
I
do
read
only
or
not
read
all
sounds
like
a
problem
for
another
day.
A
A
A
A
B
A
And
that
makes
sense,
I'm
creating
a
model
and
we
haven't
disposed
anything
model
manager.
Is
that
a
is
that
a
monocle
thing?
No,
that's
a
nice
thing,
returns
a
new
model
and
then
I've
add
on
to
my
model
manager,
a
disposable
thing
and
I
dispose
things.
Do
we
ever
add
model
manager
to
us
I'm
just
saying:
do
I
just
need
to
call
my
dispose
I.
B
B
A
B
So
so
this
is
actually
a
something
happens,
not
continuously,
but
can
happen
while
you're
doing
justice.
What
I've
been
doing
when
I
I
see
controversial
stuff
in
the
sirs
that
is
complicated.
Is
that
I
rearranged
the
test
and
then
I
try
to
open
an
issue
for
the
people
that
are
working
on
that
piece
of
source
to
look
at
look.
Look
at
the
test
highlighted
this:
are
we
relating
relying
on
this
behavior
or
or
we
should
be
fixed
right,
but
is
this
the
right
approach?
A
Really
hard
and
I
don't
even
think
the
author
of
this
would
really
know
the
right
step
like
there's
there's
this
is
collected
a
level
of
dust
already
makes
it
hard
we're
talking
about
life
cycle
of
resources
like
who
owns
what
and
that
hasn't
clearly
been
really
defined
here
in
like
is
there
tough
problems
that,
if
you
can
really
I,
think
if
you
feel
90%
confident
like
okay
doing
this
is
really
safe,
I've
done
the
research
here's?
Why
go
for
it?
I
agree
with
being
extra
careful
of.
We
could
have
something.
A
That's
relying
on
this,
this
babe
and
so
yeah
we're
doing
these
test
migrations.
Ideally,
we
wouldn't
touch
our
production
code,
and
maybe
we
could
create
test
helpers
and
that's
kind
of
a
partner
we
haven't
really
established
yet
is
shared
test
helpers
and
then
those
test
helpers
of
like
oh
well
I
actually
need
to
call
these
three
methods
to
dispose.
If
something
we
could
resolve
in
a
more
focused
effort,
but
I
I
appreciate
you
calling
me
out
of:
let's
just
do
it
here
in
the
test,
because
I
think
it's
a
good
call
yeah.
A
B
So
what
worries
me
more
than
ownership
is
feedback
loop
right.
So
if
I
break
something
in
my
stage,
I'm
gonna
get
the
feedback
that
is
broken
like
immediately
right,
so
sometimes
five
minutes
later,
but
if
I
break
something
in
create
right,
the
feedback
is
gonna
hope
in
few
times
before
the
pin
point
me
and
say:
hey,
you
did
change
that
fly.
Why
right
yeah.
A
Technically
the
mighty
stuff
I'm
I'm
on
the
create
editor
team,
so
this
is
stuff
that
the
code
that
I
would
get
pinged
on.
So
that's
and
that's
an
interesting
point
too.
It's
probably
worth
dropping
in
the
slash
channel
like
hey
I,
touched
these
files
like
it
anything
like
it
might
be.
That's
like
that
might
be
helpful
as
well.
C
C
Else
a
different
process
and
if
we're
moving
files
around
for
testing-
and
we
know,
there's
like
an
issue
what
we
could
should
change
a
file,
maybe
it
has
to
do
with
the
way
we
do.
The
EMR
is
a
bit
different.
Then
we
try
and
get
done
an
expert
and
then
we
add
like
an
extra
layer
of
review
where,
instead
of
being
like
I'm
just
moving
files
around,
it's
like
I'm,
actually
moving
code
around
and
then
who
could
help
me
just
validate
this
and
then
everyone's
aware
of,
what's
being
moved,
yeah.
A
I
would
I
would
suggest
also
yeah
getting
someone
that
has
domain
experience
with
these,
especially
these
legacy
classes
and
stuff,
like
yeah,
that
that
would
be
really
good
call.
I
agree
with
not
touching
this,
because
this
is
notoriously
flaky
and
I.
I'm
much
feel
much
safer,
just
editing
test
code.
We've
talked
about
this
before
our
pipeline
optimizes.
If
there's
just
spec
file
changes
or
pipelines
optimized,
it
doesn't
run
all
of
the
r-spec
stuff
because
it
doesn't
need
to
so.
If
we
can
keep
these.
Mrs
just
focus
on
spec.
A
B
A
No
I
can't
help
you,
so
this
is
some
spec
we're
watching
the
width
of
this
changing
whether
we
do
render
side
by
side
or
not.
A
A
B
A
A
A
B
A
B
A
B
C
A
A
And
that's
really
I
think
this
is
gives
down
the
preference
I
like
pure
functions.
I,
don't
like
functions
that
reach
outside
of
itself,
but
I
find
it
really
helpful.
These
test,
helpers
and
readability
when
we
go
ahead
and
just
all
we're
all
looking
at
the
same
subject:
yeah
I
for
these
test
helper
functions,
I,
don't
mind
that
they're
not
pure
functions.
A
It's
like
Brep,
refined
or
thin,
so
documentation
suggests
find
that
right,
yeah
yeah
and
that's
what
I've
seen
I've
seen
some
patterns
too
or
if
you
do
actually
have
like
a
shared
helper
like
here's,
we're
gonna
test
this
whole
component
of
flow
or
like
an
integration
test
helper
those
classes
keep
the
common
instance
and
like
they'll
and
then,
and
they
make
some
optimizations
based
on
their
more
stateful.
But
but
it
makes
your
test
really.
It
can
make
your
test
very
readable,
which
is
nice,
but.
A
A
B
So
you
may,
you
may
end
up
doing
this
during,
like
committing
phase
III
found
that
sometimes
to
justice
generate
false
positive,
but
mostly
with
with
view
components
one
is
like
it
will
run
like
is
defined
on
a
rapper
or
this
kind
of
stuff.
The
rapper
is
always
defined,
but
is
not
actually
what
you're
looking
about
yes,
yeah,
but
this
is
default.
A
To
escape
stuff,
so
it
should
be
all
good.
We
should
probably
add
a
letter
for
I
would
rather
see
us
like
not
there's
a
handful
of
matches.
We
probably
should
never
use
in
chess.
Better
like
one
is
like
is
like
one
is
something
like
has
match
which
doesn't
actually
deal
what
I
think
it
sounds
like
it
does,
and
also
to
be
defined
like
we
should
add
winters
for
some
of
these
kids
yeah.
You.
C
A
That's
some
so
one
thing
that
came
up
recently
interviewed
I've,
I've
kind
of
grown
too,
if
I'm
doing
an
expectation
and
it's
a
dot,
not
I
in
my
matcher
I
tried
to
be
as
ambiguous
as
possible.
So
if
I'm
saying
like
hey
was
this
called
I
won't
do
dot
not
to
have
been
called
with.
I'll
do
not
to
have
been
called
because
it's
good
to
be
really
explicit
when
you
have
a
positive
match
so
that
we
don't
have
as
large
case
of
false
positives.
But
the
opposite
is
true.
A
A
A
A
Updating
the
code
mod:
this
is
a
lot
of
fun.
You
use
this
thing
called
ast
Explorer
to
actually
see
what
you're
looking
for
and
we
are
looking
for
an
import
declaration
and
we
are
going
to
update
all
the
ramport
declarations
that
have
something
like
spec
helpers
to
outsource
to
helpers
and
then
everything
else
that
just
says
spec.
It
needs
to
be
just.
A
A
Brian,
that's
a
good
point.
So
let
me
let
me
console.log
what
we
get,
because
I'm
not
I'm,
still
not
feeling
totally
comfortable,
but
let
me
jump
into
stores.
Okay,
we
get
was
yeah,
we
get
a
lot
of
stuff
if
we
get
value
source
value,
that's
what
I
want
to
get
is
value
source
value
and
that's
what
we're
gonna
modify
so
value
source
about.
That's
the
thing
to
change
and
then
I'll
say
something
like
map
to
adjust.
Aliases.
A
B
A
A
This
is
looking
for
we're
trying
to
go
back
to
you
like
the
IDE
root
of
our
spec
like
it,
and
sometimes
we
do
this
where
we
look
for
not
just
helpers
but
we're
trying
to
go
to
like
I
want
to
get
some
mock
data
from
dips
or
whatever
so
I
go
to
my
root
test
directory
and
then
go
to
that
folder.
So
here
what
we
really
want
is
to
be
just
instead
of
spec.
A
A
A
A
Right
value,
so
I
would
expect
to
see
value
that
source
value
should
have
a
whole
lot
of
these
nope.
That's
not
what
I
want
to
do.
We
need
to
check
if
it's
defined.
First
is
it's
crushing
because
it's
sometime,
it's
not
different.
Oh
I'm,
not
returning
here.
Oh
thank
you
yeah.
That
was
that
was
gonna,
be
the
problem.
I
think
we
can.
We
can
console
console
I
feel
100%
certain.
This
is
gonna
work,
oh
gosh,
of
course,
but.
A
A
A
A
A
It
does
something
really
weird,
sometimes
when
we
look
into
the
args
of
a
mock
and
so
it
actually
pretty
bad
JavaScript,
which
wasn't
possible
at
all
which
failed
when
we
tried
to
rerun,
which
is
fine,
but
this
thing
should
work
now
and
we
should
be
able
to
see
that
and
gosh
I
keep
losing
my
place.
I
have
a
handful
of
vs
codes,
open
yeah,
it
worked
there,
we
go
so
there
spec
helpers,
yeah,
that's
bad
and
we're
doing
some
weird
spy
on
dependency.
Stuff.
A
A
A
A
B
A
A
good
idea
when
I
create
them
are
I
will
update
the
issue
with
links
to
what's
being
handled
in
this
case.
Thank
you
very
much.
Yeah.
Let's
guide
you
I'm
gonna
try
to
do
these
stores,
so
it
should
be
mostly
use
the
components
left,
but
this
was
this
was
good.
I
was
really
nervous
about
the
monocle
editor
stuff,
but
I'm
glad
we're
glad
we
resolved
it
thanks.
So
much
for
hopping
on.
You
guys
have
any
closing
thoughts
or
remarks
or
oh
good.