-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also added test
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* eslint-disable */ | ||
'use strict'; | ||
|
||
var env = require('./env'); | ||
var create = require('../../index').create; | ||
var addonPrefixer = require('../../addon/prefixer').addon; | ||
|
||
function createNano (config) { | ||
var nano = create(config); | ||
|
||
addonPrefixer(nano); | ||
|
||
return nano; | ||
}; | ||
|
||
describe('prefixer', function () { | ||
it('installs without crashing', function () { | ||
var nano = createNano(); | ||
expect(nano).toBeDefined(); | ||
}); | ||
|
||
it('handles "user-select" correctly', function() { | ||
var nano = createNano(); | ||
|
||
nano.putRaw = jest.fn(); | ||
|
||
nano.put('.one', { | ||
'user-select': 'none' | ||
}); | ||
|
||
var result = nano.putRaw.mock.calls[0][0].replace(/ +(?= )/g,''); | ||
[ | ||
'-ms-user-select', | ||
'-moz-user-select', | ||
'-webkit-user-select', | ||
'user-select' | ||
].forEach(function(key) { | ||
expect(result.includes(key)).toBe(true); | ||
}); | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
380f65f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build version:
3.2.1-master.90
🤞master
on CircleCI 🎉