mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-13 08:32:26 +03:00
switch to vue cli for build
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
import Select from '../../src/components/Select.vue';
|
||||
|
||||
describe('Serializing Option Keys', () => {
|
||||
import Select from "../../src/components/Select.vue";
|
||||
|
||||
describe("Serializing Option Keys", () => {
|
||||
const getOptionKey = Select.props.getOptionKey.default;
|
||||
|
||||
it('can serialize strings to a key', () => {
|
||||
expect(getOptionKey('vue')).toBe('vue');
|
||||
it("can serialize strings to a key", () => {
|
||||
expect(getOptionKey("vue")).toBe("vue");
|
||||
});
|
||||
|
||||
it('can serialize integers to a key', () => {
|
||||
it("can serialize integers to a key", () => {
|
||||
expect(getOptionKey(1)).toBe(1);
|
||||
});
|
||||
|
||||
it('can serialize objects to a key', () => {
|
||||
expect(getOptionKey({label: 'vue'})).toBe('{"label":"vue"}');
|
||||
it("can serialize objects to a key", () => {
|
||||
expect(getOptionKey({ label: "vue" })).toBe('{"label":"vue"}');
|
||||
});
|
||||
|
||||
it('will use an ID property if the object contains one', () => {
|
||||
expect(getOptionKey({id: 1})).toBe(1);
|
||||
expect(getOptionKey({id: 'one'})).toBe('one');
|
||||
expect(getOptionKey({id: {im: 'a nested object'}}))
|
||||
.toEqual({im: 'a nested object'});
|
||||
it("will use an ID property if the object contains one", () => {
|
||||
expect(getOptionKey({ id: 1 })).toBe(1);
|
||||
expect(getOptionKey({ id: "one" })).toBe("one");
|
||||
expect(getOptionKey({ id: { im: "a nested object" } })).toEqual({
|
||||
im: "a nested object"
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user