►
Description
In this session we pair program on a preexisting MR around improving MutationObserver's in our Jest test environment. We then pair on fixing a bug around usernames with special characters in MR assignees.
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67250
A
Recording
and
progress
yeah,
so
we
are
talking
about
this
problem,
why
my
mac
starts
freezing
and
cannot
boot
up,
because
now
this
is
the
problem.
This
is
the
problem
right
like
no.
I
have
from
time
to
time
that
it
just
freezes
when
you
want.
You
know
when
it
has
a
sleep,
wake
failure,
but
please
ignore
the
low
stack
shot.
What
I
mean,
why
is.
B
A
Okay,
cool,
no
all
kidding
aside,
so
we
want
to
release
a
major
upgrade
of
gitlab
ui,
which
drops
browser
support
for
some
older
browsers,
which
means
we
don't
need
to
polyfill
one
older
one,
one
browser
ap.
I
called
the
resizeobserver
we
already
fixed
this
in
gitlab
ui,
it's
fixed
in
a
branch
there,
but
tests
started
failing
in
gitlab
as
well
with
every
component
that
uses
the
the
observer
right
under
the
hood,
and
so
the
problem
is
gitlab,
not
gitlab.
A
A
A
A
The
current
implementation
of
our
mock
observers
just
support
one
mock
observer,
and
so
all
the
things
that
we
do
on
the
one
mock
observer,
you
know
if
we
decide
to
mock
a
certain
observer,
will
just
happen
on
the
last
one
that
we've
built
so
in
case
and
what
we
actually
have
in
the
code
in
on
the
test.
If
we,
you
know
accidentally,
create
multiple
observers,
we
didn't
trigger,
like
the
observation
on
all
the
observers
and
we
actually
created
like
too
many
observers
and
so
yeah.
A
I
modified
this
code
to
you
know,
handle
multiple
observers
and
just
iterate
through
them
and
just
have
one
trigger
function.
We
also
had
this
thing
where
we
counted
the
observers,
which
isn't
really
the
thing
that
we
actually
wanted
to
test
in
a
test
that
did
it
in
the
test
that
did
it.
We
wanted
to
see
that
you
know
stuff
gets
properly
disconnected,
so
I
changed
the
tests
to
spy
on
the
observer
disconnect
and
you
know
hey
that
shouldn't
have
been
called
okay,
we're
destroying.
A
It
has
been
called
one
time
right,
but
now
the
fun
thing
is
suddenly
tests
started
failing
in
the
jest
integration
tests
and
I'm
like
what
the
heck
happened,
because
I
chose
with
the
resizeobserver.
This
is
the
observer
where
we
dropped
the
polyfill
and
suddenly
a
lot
of
tests
start
failing
and
the
fun
thing
is.
We
also
have
a
lot
of
tests
that
actually
don't
do
anything
with
the
mock
intersection
observers.
We
just
need
to
add
them
so
that
the
tests
don't
fail,
because
some
underlying
components
are
creating
observers
right.
A
So
you
can
see
here
like
we're
using
a
mock-up
server,
even
though
that
democrat,
so
we're
not
doing
anything
with
the
mock-up
server.
So
my
thought
is
hey.
Why
don't
we
add
like
all
the
observers
globally
and
we're
good
to
go
and
if
we
need
to
override
them
with
our
mock?
That
does
you
know
more
things.
A
We
can
use
the
existing
mock-up
server
and
finally,
tests
started
failing
and
it
all
comes
down
to
this
wait.
I
should
share
my
code,
I
I
commented
this
out
again:
I'm
logging
all
the
observers
and
it
seems
jstorm,
actually
implements
a
proper
mutation
observer,
so
we
actually
just
need
to
mock
the
other
three,
because
we
actually
have
a
proper
mutation
of
cell
cool
yeah.
A
So
that's
the
fun
thing,
and
now
I
was
trying
to.
D
A
A
A
So
I
now
manually
trigger
the
mutation
observer
right,
the
mock
mutation
observer
and
then
the
tests
work
again,
but
this
all
just
happened
because
I
overwrote
the
original
observer
right.
So
in
order
to
test
my
theory
that
I
now
fix
things
with,
you
know
this:
let's
not
mock
the
object,
mutation
observer
all
right.
A
D
It's
probably
unnecessary,
can
you
kill
and
restart
the
jest
process?
Yes,
it
actually
does
it
automatically,
but
it
was
off
screen.
So
I
didn't
see
it.
Okay,.
A
A
A
D
A
A
Sorry
too
bad
too
much
bash
right.
If
this
global
observer.
C
C
A
D
D
A
A
A
C
So
correct
me
if
I'm
wrong,
but
the
mock
observer
is
something
that
can
be
used
for
any
one
of
those
intersection.
Mutation,
resize
right.
A
C
A
Yeah
and
that's
what
I
meant
right
so
rather
than
mocking
and
triggering
it,
we
actually
could
trigger
the
mutation
that
should
cause
the
thing
to
you
know
like,
for
example,
if
you
go
into
the
pop
overs
you
could
probably
I
mean
what
are
we
checking
here
again
here?
We
checking
that
the
observer
actually
disconnects
right
yeah,
I
don't
know
I
mean,
maybe
maybe
a
future
pairing
session
can
think
about
this
yeah.
D
A
A
Here,
for
example,
instead
of
triggering
mutation,
we
could
actually
just
what
do
are
we
doing
here
removes
pop
over
when
target
is
removed
from
documents,
so
we
could
just
remove
the
target
from
the
document
right,
yep,
yeah,
that's
where
it's
worth
the
follow-up
for
sure
I
mean
it
would
be
interesting
to
check
this,
or
do
you
feel
this
is
out
of
scope?
C
Yeah,
no,
I
feel
like
it's
out
of
scope,
because
the
main
goal
is
upgrading
git,
lab,
ui
and
actually.
A
It's
not
the
main
goal.
I
I
my
main
goal
is
to
get
the
integration
branch
passing
and
because
this
observer
shenanigans
is
completely
independent
from
the
upgrade
kinda,
we
could
actually
pull
it
out
into
a
new
merge
request,
merge
the
mutation,
observer
testing,
changes
and
then
go
forward
with
our
lives
right
then
I'd
upload,
update,
gitlab,
ui
right,
but
like
this
test,
wouldn't
isn't
failing
right.
A
A
D
A
Is
that
yeah,
all
right
and
and
another
one
is
tooltips,
so
it's
exactly
the
same
spec,
but
with
tooltips
instead
of
pop
overs
and
the
other
one
is
the
image
lazy,
loader,
oh
yeah,
yeah,
and
in
in
the
image
lazy
loader,
we
mock
the
intersection
observer,
which
we
need
to
mock
but
yeah
it.
I
think
it
would
still
make
the
tests
a
little
bit.
I
don't
know
how
often
are
we
triggering
the
mutations
here
trigger
child
mutation?
A
So
what
is
trigger
child
mutation
yeah
so
actually
funny?
Because,
probably
if
we
weren't
overwriting
the
in
this
lazy
loading
spec,
this
should
also
work.
But
I
agree
with
you
folks
that
this
is
probably
a
follow-up
and
it
will
be
a
neat,
mr
just
removing
the
mockumentation
observer,
because
we
don't
need
it
anymore.
Pop
a
little
good.
B
A
Cool
exactly
no.
I
was
wondering
because
the
fun
thing
how
I
detected
it
by
the
way
is
we're
using
this
testing
library
called
testing
library
for
the
integration
specs.
It
seems
to
be
similar
to
capibara,
query
stuff
right
and
it's
funny
because
it
uses
mutation
observers
under
the
hood
and
I'm
just
like
how
did
this
ever
work
in
jsdom,
because
if
it's
using
them
under
the
hood,
you
know
in
order
to
wait
for
elements
and
these
kind
of
things.
How
did
that
work?
Because
we
just
have
the
mock
implementation?
D
A
D
A
What
what
is
paul
doing,
yeah.
A
Okay,
cool
spend
the
first
20
minutes
on
that.
We'll
push
the
changes
while
we're
talking
about
other
things:
cool.
C
Yeah
that
was
awesome.
I
also
shared
an
eye
chat,
a
link
to
so
I
looked
up
on
sourcegraph
repos,
with
jsdom
and
mutation
observer
you're
lovingly
sent
to
their
mutation
observer
implementation,
which
looks
like
there's
a
commit
from
like
two
to
three
years
ago.
That
included
this.
So
but
I
guess
maybe
we
were
in
a
much
older
version
of
js
dom
when
we
first
had
to
do
the
mock
observer
stuff.
So
that
was
interesting
cool
thanks
for
sharing
that
ip.
C
That
was
really
cool,
and
it's
cool
to
see
that
we'll
be
able
to
test
this
and
more
of
an
integration.
Does
anyone
have
anything
else
that
they
want
to
appear
on?
I
I
have
a
wealth
of
things
that
we
can
just
pick
from,
I
kind
of
like
doing
testing
stuff,
but
I
don't
know
if
anyone
there's
also,
we
could
check
out
the
is
this
known
channel
and
just
pick
something
that
seems
broken.
B
This
isn't
there's
a
main
one.
Now,
actually
you
know
the
the
next
badge
in
the
top
left
hand
corner
for
the
last.
What
three
months
that's
been
appearing,
big
and
then
shrinking?
Why
does
it
do.
D
Yeah,
it
has
to
be
that's
related
to
the
recent.
What
is
called
the
application
utilities
file
getting
loaded
too
late,
or
something
like
that.
It's
css
load
ordering.
Basically,
oh.
B
C
Css
too
yeah.
B
A
Can
but
we
can,
we
can
fix
it,
definitely
yeah.
I
I
I
have
another
one
that
you
know
relates
to
me.
Actually,
oh
okay,
and
it's
one.
That's
really
annoying
wait.
Let
me
share
my
screen.
I
don't
know
if
you
want
to
work
on
that.
One
well.
C
I
I
do
want
to
fix.
I
I'm
you
know.
I
appreciate
you
bringing
that
up
late,
because
it
has
bothered
me
for
a
little
while
this
next
splash.
D
D
A
I
feel
like
that
was
fixed
at
one
point
and
it
got
broken
again.
We
need
to
know
the
fun
thing.
Is
it
really
depends
on
which
components
are
used.
So
if,
if
it's
just
me,
it's
fine,
but
if
it's
that
list-
and
we
have
like
and
also
it's
not
necessarily
about
the
merge,
it's
also
about
the
busy
indicator,
because.
B
C
B
C
B
If,
if
you're,
let's
do
the
apostrophes
and
funny
characters
first,
but
if
you're
good
at
multitasking
paul,
what's
your
take
on
why
the
the
next
badge
is?
Is
it
was
it
mark
or
someone's
to
do
with
what
they
said
about
the
order
of
loading,
or,
I
think.
C
D
C
D
Go
ahead.
Sorry,
sorry,
paul!
I
guess
the
issue
is
that
we're
doing
startup
css,
but
not
in
a
canary
scenario.
Right,
that's
gonna,
be
it.
C
And-
and
that's
all
we
have
to
do
is
update
our
fixture
to
flag
to
force
that
next
badge
to
show
up
and
it'll
be
caught,
so
that'll
be
really
easy
to
do.
Okay,
making
people
that
have
apostrophes
and
quotes
in
their
name
that
that'll
be
the
harder
one.
C
A
Yeah
it,
I
think
it's
because
we're
concatenating
strings
merge,
request
escape.
A
This
is
the
issue
by
the
way
I'm
sharing
it
in
the
zoom.
C
C
B
B
B
A
So
this
is
a
so
maybe
go
on
master
because
I
think
the
busy
indicator
has
been
added
after
okay,
like
the
link
has
like
a
specific
commit.
That's
quite
old.
I
don't
know
when
I
I
raised
that
issue.
Over
a
year
ago,
oh
tooltip
see
generate
assignee
tooltip,
oh
we
externalized
it,
so
it
might
mean
that
we
can
fix
it
in
one
place
for
all
the
places.
That's.
C
C
A
C
Yep,
okay,
we're
gonna
we're
gonna,
try
to
see
if
we
can
tdd
this
and
create
the
passport
so
not
sure
where
the
name
root
is
coming
from
user
data
mock.
Okay.
C
I'll
create
a
new
describe
with
user,
with
a
special
user
yeah
and
all.
E
C
C
B
Yeah
be
single
because
david's
one
I've
noticed
as
well
with.
A
B
C
A
Maybe
we
need
the
live
coding
so
that
we
all
can
type
in
that
line
right.
Sure,
that'll.
C
2B
should
be
your
name,
so
I'm
actually
or
at
least
contain
your
name.
So
I'm
going
to
put
a
special
name
here.
Lucas
you
have
a
special
name.
A
C
Oh
you're,
right,
if
you
wrote
this
and
you're,
if
you
wrote
this
code,
it
would
seem
a
little
what
what
do
you
think
of
conan?
Oh
barbarian,
oh
conan,.
C
C
A
That
tolkien
or
his
you
know
susan,
is
talking
already
public
domain.
We
need
to
find
someone
who's
here.
C
C
What
do
you
think
of
rabbit
o'hare,
nice,
nice.
B
B
C
Well,
it's
not,
I
I
kind
of
think
he's
got
an
old
machine.
He
doesn't
suffer
from
that.
I
know.
That's
there
you
go,
it
just
has
taken
its
time,
but
this,
I
think,
sentinel
one,
even
though
they've
improved
some
of
it.
I
I've
noticed
with.
A
Thing
like
that
right,
I've
noticed,
so
I
have
the
theory
that
sentinel
one
is
trying
to
fight
infection
like
your
body
by
just
increasing
the
heat
right
like
like.
C
B
C
C
D
That's
a
good
question:
yeah.
Can
you
check
in
some
german
umlauts
well
angle
brackets
as
well?
Okay,.
A
Rename
your
root
to
you
only
just
rename
the
real
sure.
A
Can
just
name
it
root,
root,
root,
where's,
my
full
name,
administrator.
A
A
Omelette
of
an
omelette
we
need,
no,
I,
I
don't
think
you
need
to
add
an
umlaut
is
the
german
ones
when
it's
like
and
putting
more.
C
C
C
Okay,
so
we
got
the
assignees,
but
this
only
happens
if
there's
multiple
signings,
yes,
so
we're
gonna,
add
oh
I'll.
Add
that
and
ezra
here.
C
B
A
C
C
A
C
Oh
yeah,
look
here:
we've
done!
Oh
yeah,
yeah
yeah,
I
see
status.
Information
is
something
we're
building
like
this
got
it
so
yeah,
I
said,
can
merge
defaults
so
over
here
when
we
were
doing
our
test
case.
We'll
just
do
can
merge
to
false
so.
A
C
A
C
D
No,
I
think
it's,
I
think
it's
the
s
printf,
because
petty
default
is
it's
escaping
stuff
right,
yeah
exactly
and
I
think
it's
transforming
the
apostrophe
to
the
to
the
hex
entity.
Yeah.
C
B
B
D
C
So
I'm
I'm
having
a
hard
time
creating
a
a
test
for
this.
I'm
here
calling
create
component,
but.
B
C
A
C
Maybe
it's
easier
to
set
the
availability
to
busy
oh
you're
right,
here's
the
issue,
we'll
type
you're
right,
you're,
right,
you're,
right,
you're,
right,
you're
right!
I
didn't
notice
that.
Thank
you.
Thank
you.
C
C
So
I've
I've
picked
up
a
really
bad
habit.
This
week
I've
started
playing
chess
and
I
started
playing
bullet
chess,
which
is
one
minute
timer
and
I'm
so
bad
at
it,
but
I
get
so
addicted
to
it.
It
was
like
every
time
I
lose,
I'm
like.
Oh
get
me
another
one,
and
so
I
I
I've
been
staying
up
really
late
playing
bullet
journal.
A
C
D
A
We
should
do
one
of
these
sessions
where
we
just
fix
all
the
under
the
snake
case
too
yeah.
A
C
C
A
C
That's
true:
I
get
a
status
information
print
parenthesized
prepended
join.
Yes,
that's
a
good
something.
C
So
what
we're
concerned
about
is,
if
I'm,
you
know
a
script
if,
on
the
script
kind
of.
A
D
Should
be
doing,
it
should
be
doing
just
a
text
content
rather
than
yeah
generation.
So
we
you
feel
like
there's,
not
a
like
xss.
C
Actually
move
this
over
to
our
parameterized
specs
yeah,
I'm
going
to
move
this
over
to
our
parameterized
spec,
to
where
I
can
actually
set
the
name
here.
C
And
that
should
be
nice,
so,
let's,
let's
do
that?
Can
we
just
change.
C
Just
change:
why
don't
you
just
change
root?
Well,
I
think
grab
it
over
here.
Well,
I
was
wanting
to
test
out.
I
was
one
to
test
out
a
funky
xss
case.
I
just.
B
Wanted
to
do
just
a
one
or
two
others,
but
then
how
are
you
gonna
know
what
it
ultimately
does
with
it,
or
are
you
expecting
it
to
convert.
A
C
I'm
saying
and
I'm
fine
removing
this,
but
what
we,
what
were
you
looking
at?
What
scroll
down
here.
E
A
D
D
Right
so
I've
just
had
a
look
at
that
and
bootstrap
view.
You
have
to
opt
in
with
an
8.html
modifier
to
the
tooltip
directive,
so.
C
Good
follow-up
by
the
way
yeah
yeah,
but
I
do
want
to
have.
C
C
C
C
C
D
C
A
E
A
It
each
no,
I
don't
care
it's
fine.
It
makes
it
a
little
bit
more
reasonable,
reasonable,
readable,
yeah
cool.
Are
we
good
okay?
So
my
question:
is
you
fixed
it
now
right?
Could
you
go
back
to
your
browser
and
check
whether
the
drop
down
is
also
fixed?
I
reckon
not
right.
So
that's
probably
a
different
bug
like
if
you
go
there
and
search
for
yourself
yeah.
It's.
B
C
A
E
A
Do
you
know,
do
you
know
this
file?
I
just
showed
it
to
mark
today.
Can
you
search
for
user
select?
Yes,
skittle
users
select,
brace
yourself
right,
like
it's,
it's
user
select
index
js
something
not
view
it's
index.
It's
like
a
java
user,
select
javascript
yeah,
there's
a
spec
node,
it's
not
the
one.
D
C
That
sh,
that
really
should
bring
it
up.
Yes
yeah,
so
this
is
like
used
to
be
conscript
right.
This
is
one
of
those.
C
Yeah,
so
here's
the
other
interesting
thing,
so
you
did
talk
about.
Do
we
want
sprint
f
to
be
doing
this
kind
of
escaping
thing.
C
D
Function
right,
we
we
do
have
dom
purify.
C
C
Yep
we
we
did
a,
we
did
a.
I
reviewed,
mr
of
this,
and
I
was
like
this
is
so
fragile
to
change.
So
this
is
one
of
the
first
penning
tests
that
I
did
at
gitlab
was
because
you
just
can't
tell
am
I
gonna
break
something
or
not,
so
we
just
penned
everything
made
some
small
change
and
then,
thankfully
the
pens
were
good
but
yeah.
C
This
is,
it
is
gnarly
and
one
of
the
things
if
I
there's
like
some
lines
of
code,
because
this
did
come
from
coffeescript,
which
is
kind
of
like
ruby,
where,
like
the
last
line,
is
technically
a
return,
there's
some
lines
of
code
that
are
like
just
an
expression
that
doesn't
do
anything,
but
it's
meant
to
return
it.
That's
something.
C
A
A
A
D
A
D
A
Yeah
I
mean
you
know,
I
don't
care
about
the
drop
down
to
be
honest
because
I
always
use
the
markdown
quick
commands.
So
I'm
happy
if
that
is
fixed,
and
I
think
it's
two
different
issues
you
wouldn't
want
to
fix
them
in
the
same
amount.
A
C
A
Wealth
redistribution
right
like
from
from
a
large
private
company
yeah,
so
this
is
already
oh.
This
is
already
double
escaping
right
and
escape
is
even
the
wrong
use
here.
Right.
C
C
A
D
Where's
don
purify
live
is
that
just
it's,
it's
tilde,
slash
lib,
slash,
sanitize
html,
possibly
okay,
I'm
gonna!
Look
for
it
over
here.
C
A
Can
just
call
sanitize
it's
import
sanitize
from
slash
lip
slash,
not
not
this
one.
Just
yeah
lip
don
purify
is
the
folder
okay.
C
A
C
A
A
C
Let's
do
it,
let's
do
it.
Where
do
I
gotta
go?
I
guess
I
go
here
you
just
how
do
I?
How
do
I
alphabetize
things?
Okay,.
D
A
Yep
you
know
I
I
would.
I
would
like
to
add
an
import
rule
that,
by
the
way,
replaces
the
two
dots
with
utility,
because
it's
the
it's
shorter
right,
like
oh,
you
mean
like
here,
because
we
are
still
going
to
the
root
yes
and
I
would
love
if
that
would
be
consistent.
That's
more
important
than
the
order
for
me,
but
to
be
honest,
like
eslint
can
fix
it
right.
C
D
C
Right
we,
where
were
we,
I'm
looking
for.
A
D
D
Sanitize,
as
escape.
B
C
C
A
C
C
I
think
I
may
have
may
have
been.
Oh,
I
was
yeah
I
I
was.
I
was
responsible
for
adding
the
spec
because
it
had
no
specs
and
then
we
were
running
to
issues
I
was
like.
We
got
to
do
some
sort
of
thing
here,
but
because
there's
an
ee
version,
which
I
thought
evan
evan,
you
committed
that
right
because
it
says
you
yes,
you're
right:
no,
no!
No!
Okay!
It's
not
finished
loading.
What's
wrong.
With
this.
A
C
A
To
be
honest,
like
we
were
calling
escape,
we
were
calling
escape
there
quite
a
lot,
so
it
could
be
that
dom
sanitize
now
runs
like
20
times
on
that
one
line
right
like
for
for
each
line
or
something
like
that,
and
so
that
we
actually
have
like
a
performance
regression
here.
Yeah
dom
purifier
is
quite
a
lot
heavier
than
just
a
plane
escape
yeah.
C
I
think
I'll
create
mr
with
a
to-do
question
about
you
know,
but
maybe
we
don't
want
to
hit
that
performance
bit
and
maybe
we
want
to
just
create
selectively.
A
A
D
The
only
thing
is,
what
might
happen
in
that
case
is
someone
might
construct
a
username
which
breaks
the
rest
of
the
template,
that's
being
built,
so
I
guess
it
could
break
that,
so
someone
could
have
a
username.
That
means.
D
A
We're
not
correct
usernames
anymore,
but
now
azi.mof
is
not
a
correct.
Username
anymore,
like
us.