Skip to content

Commit

Permalink
Get rid of before/after (toward jest migration)
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Sep 11, 2017
1 parent 68d59c1 commit 183b3a8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const tmpdir = path.join(os.tmpdir(), 'yeoman-base');
const resolveddir = path.join(os.tmpdir(), 'yeoman-base-generator');

describe('Base', () => {
before(helpers.setUpTestDirectory(tmpdir));
beforeEach(helpers.setUpTestDirectory(tmpdir));

beforeEach(function () {
this.env = yeoman.createEnv([], {'skip-install': true}, new TestAdapter());
Expand Down Expand Up @@ -999,7 +999,7 @@ describe('Base', () => {
});

describe('Events', () => {
before(function () {
beforeEach(function () {
class Generator extends Base {}
this.Generator = Generator;
Generator.namespace = 'angular:app';
Expand Down
2 changes: 1 addition & 1 deletion test/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function rm(filepath) {
}

describe('Storage', () => {
before(helpers.setUpTestDirectory(tmpdir));
beforeEach(helpers.setUpTestDirectory(tmpdir));

beforeEach(function () {
this.beforeDir = process.cwd();
Expand Down
4 changes: 2 additions & 2 deletions test/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Base = require('..');
const tmpdir = path.join(os.tmpdir(), 'yeoman-user');

describe('Base#user', () => {
before(function () {
beforeEach(function () {
this.prevCwd = process.cwd();
this.tmp = tmpdir;
makeDir.sync(path.join(tmpdir, 'subdir'));
Expand All @@ -23,7 +23,7 @@ describe('Base#user', () => {
shell.exec('git config --local user.email yo@yeoman.io');
});

after(function (done) {
afterEach(function (done) {
process.chdir(this.prevCwd);
rimraf(tmpdir, done);
});
Expand Down

0 comments on commit 183b3a8

Please sign in to comment.