This is the ever-tempting marshmallow test.
The test is done on individuals that specifically LOVE marshmallows. The person is given a single marshmallow and left alone for 20 minutes. If they do not eat the marshmallow in that time, they get a 2nd marshmallow and they get to eat both of them. If the person eats their marshmallow before the 20 minutes is up… sucks for them.
The above video tests adults, rather than children. It’s pretty awesome.